Hello,
I am the developer of the LinkTitles extension which uses the PageContentSave
hook to add [[...]] links to other, existing pages whenever a page is edited
and saved. The extension used to work with MediaWiki versions up to 1.31, but
no longer works with 1.32.
Hopefully it does not break the etiquette of this list to post my question
here. I have spent a lot of time troubleshooting the issue, including
researching the commit history, but I am unable to get it to work again and
would appreciate some help.
This is the code that no longer works as expected, boiled down to the
essential lines of code:
public static function onPageContentSave( &$wikiPage, &$user, &$content,
&$summary, $isMinor, $isWatch, $section, &$flags, &$status ) {
$newText = "this is for demonstration";
if ( $newText ) {
$content->getContentHandler()->unserializeContent( $newText );
}
return true;
}
In MediaWiki versions up to 1.31, the saved page would now contain the text
"this is for demonstration". In version 1.32, the page content is not changed.
I did verify that the code inside the `if` block is reached upon saving an
edited page.
Thank you very much indeed!
Kind regards
Daniel Kraus