Extension talk:Auto Create Category Pages/Archive 1

From mediawiki.org
Latest comment: 7 years ago by FreedomFighterSparrow in topic Problem with 1.27

Hello. I installed your extension, but didn't see it's work. I have a cookbook site and want automatically to create pages of used categories in receipt. It's needed to show that categories in the search form. But pages don't want to be created. Do I need some configuration for the extension? What did I wrong?

Founded bug 18245, I think it's it.

Thanks, Taras, Kyyiv.

fixed for Mediawiki 1.18

To make it run on mw 1.18 I had to make one change: In AutoCreateCategoryPages.body.php the call signature was wrong. I removed all & in front of the paramters of this function, and then it works:

public function UW_AutoCreateCategoryPages_Save ( $article, $user, $text, $summary, $minoredit, $watchthis, $sectionanchor, $flags, $revision ) Alois alois@astro.ch

the 1.18 fix worked for 1.20 also

Thanks for the find! --Exprexxo (talk) 16:20, 3 January 2013 (UTC)Reply

Problem with 1.27

After installing Mediawiki 1.27 I get these apache errorlog entries: PHP Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method AutoCreateCategoryPages::onUserGetReservedNames() should not be called statically in /www/docs/wiki/includes/Hooks.php on line 195,

How can I fix this?

Later: I changed AutoCreateCategoryPages.body.php line 74 to:

  public static function onUserGetReservedNames( &$names ) {

That fixed the problem. --Aloist (talk) 16:11, 3 July 2016 (UTC)Reply

Thanks for reporting this, Aloist! This is simply shoddy programming on my part, and probably doesn't have to do with MW 1.27, but with a change in your PHP settings which enabled "strict standards", so that the issue was no longered covered up (maybe you upgraded PHP as part of the MW 1.27 upgrade?). I'll get this fix into the official code soon. Thanks again! --FFS Talk 08:39, 6 July 2016 (UTC)Reply
Done now in the master branch. --FFS Talk 19:20, 2 August 2016 (UTC)Reply