Skip to content

Issue with Mediawiki 1.43 (maybe other Versions also affected) #18

@monsterkrampe

Description

@monsterkrampe

This extension currently does not work with (at least) Mediawiki 1.43 because of an internal Mediawiki issue.
See https://phabricator.wikimedia.org/T394379

A potentially acceptable workaround would be to apply the following patch to this extension (disabling recent changes for the newly created page).

diff --git a/src/AutoCreatePage.php b/src/AutoCreatePage.php
index ebd73ac..e562237 100644
--- a/src/AutoCreatePage.php
+++ b/src/AutoCreatePage.php
@@ -177,7 +177,12 @@ class AutoCreatePage implements
 			$factory = MediaWikiServices::getInstance()->getPageUpdaterFactory();
 			$updater = $factory->newPageUpdater( $page, $author );
 			$updater->setContent( SlotRecord::MAIN, $pageContentText );
-			$updater->saveRevision( $comment );
+
+			// NOTE: The first assertion in RecentChange::notifyNew() fails in Mediawiki 1.43 when calling this without the EDIT_SUPPRESS_RC flag.
+			// With the flag, the method is simply not called.
+			// This is due to an internal bug in Mediawiki apparently.
+			// See https://phabricator.wikimedia.org/T394379
+			$updater->saveRevision( $comment, EDIT_SUPPRESS_RC );
 
 			// wfDebugLog( 'createpage', "CREATED PAGE " . $pageTitle->getText() . " Text: " . $pageContent );
 		}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions