Topic on Extension talk:AutoCreatePage

Jump to navigation Jump to search

Extension not working at all

12
Summary by Kghbln
JeremiPlazas (talkcontribs)

Hi there,

Working on

Product Version
MediaWiki 1.29.2
PHP 5.6.36 (apache2handler)
MySQL 5.6.40
ICU 50.1.2
Elasticsearch 5.3.3

Extension was working until a little while ago. Not sure what happened. It was inside #if function. Multiple instances of #createpageifnotex function on same page. Tried reducing to one instance inside a template. Tried increasing $egAutoCreatePageMaxRecursion and toggle $egAutoCreatePageIgnoreEmptyTitle to true. Nothing is working. Even specified $egAutoCreatePageNamespaces to include TEMPLATE namespace. No errors, even with debug on. Just nothing happening. Tried running the jobs list. still nothing.

Any clues anyone?

Thanks

Kghbln (talkcontribs)

> Extension was working until a little while ago. Not sure what happened.

Did you upgrade MediaWiki, PHP, etc.? If yes which versions were you using before.? This will probably help developers to assess the situation a bit better.

Kghbln (talkcontribs)
JeremiPlazas (talkcontribs)

Thanks much. Logged in to sandbox and tested. Everything working fine there. Of course the software setup is newer. But still...

Thanks

Oetterer (talkcontribs)

I'm running it succesfully on 1.27.4. Just to be sure: you added NS_TEMPLATEto the array $egAutoCreatePageNamespaces?

JeremiPlazas (talkcontribs)

Yes I did. And no I did not update MW or PHP. It just stopped working at some point. Also it is now breaking another wiki on that same farm:

[85b369eaf612a29031da2ec0] /index.php/Main_Page MWException from line 336 of /mnt/centaurdata/websites/MediaWikiFarm/includes/MagicWord.php: Error: invalid magic word 'createPage'

Backtrace:

#0 /mnt/centaurdata/websites/MediaWikiFarm/includes/MagicWord.php(261): MagicWord->load(string)

#1 /mnt/centaurdata/websites/MediaWikiFarm/includes/parser/Parser.php(4858): MagicWord::get(string)

#2 /mnt/centaurdata/websites/MediaWikiFarm/extensions/AutoCreatePage/AutoCreatePage.php(55): Parser->setFunctionHook(string, Closure)

#3 [internal function]: {closure}(Parser)

#4 /mnt/centaurdata/websites/MediaWikiFarm/includes/Hooks.php(186): call_user_func_array(Closure, array)

#5 /mnt/centaurdata/websites/MediaWikiFarm/includes/parser/Parser.php(337): Hooks::run(string, array)

#6 [internal function]: Parser->firstCallInit()

#7 /mnt/centaurdata/websites/MediaWikiFarm/includes/StubObject.php(113): call_user_func_array(array, array)

#8 /mnt/centaurdata/websites/MediaWikiFarm/includes/StubObject.php(139): StubObject->_call(string, array)

#9 /mnt/centaurdata/websites/MediaWikiFarm/includes/cache/MessageCache.php(1112): StubObject->__call(string, array)

#10 /mnt/centaurdata/websites/MediaWikiFarm/includes/cache/MessageCache.php(1112): StubObject->firstCallInit()

#11 /mnt/centaurdata/websites/MediaWikiFarm/includes/cache/MessageCache.php(1088): MessageCache->getParser()

#12 /mnt/centaurdata/websites/MediaWikiFarm/includes/Message.php(1259): MessageCache->transform(string, boolean, Language, Title)

#13 /mnt/centaurdata/websites/MediaWikiFarm/includes/Message.php(874): Message->transformText(string)

#14 /mnt/centaurdata/websites/MediaWikiFarm/includes/Message.php(934): Message->toString(string)

#15 /mnt/centaurdata/websites/MediaWikiFarm/includes/OutputPage.php(936): Message->text()

#16 /mnt/centaurdata/websites/MediaWikiFarm/includes/OutputPage.php(984): OutputPage->setHTMLTitle(Message)

#17 /mnt/centaurdata/websites/MediaWikiFarm/includes/page/Article.php(464): OutputPage->setPageTitle(string)

#18 /mnt/centaurdata/websites/MediaWikiFarm/includes/actions/ViewAction.php(68): Article->view()

#19 /mnt/centaurdata/websites/MediaWikiFarm/includes/MediaWiki.php(499): ViewAction->show()

#20 /mnt/centaurdata/websites/MediaWikiFarm/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title)

#21 /mnt/centaurdata/websites/MediaWikiFarm/includes/MediaWiki.php(862): MediaWiki->performRequest()

#22 /mnt/centaurdata/websites/MediaWikiFarm/includes/MediaWiki.php(523): MediaWiki->main()

#23 /mnt/centaurdata/websites/MediaWikiFarm/index.php(43): MediaWiki->run()

#24 {main}

JeremiPlazas (talkcontribs)

Hey all, so it seems i've figured out why it wouldn't work on my initial wiki. (Still don't know why it's breaking this other wiki above, if you have info on that, t'would be great.) But i was trying to run the parser function from a subpage, which doesn't seem to work. When i call the function from a root page it works fine. Is there any way to make it work from subpages?

Thanks again for the help!

84.60.31.250 (talkcontribs)

That is at least partially good news. It would be best, if you could add an issue on the extension’s github page concerning the problem with subpages. This way you maximize your chances for a fix.

JeremiPlazas (talkcontribs)
Kghbln (talkcontribs)

@Oetter: On sandbox I added the template namespace to the configuration parameter though I am not sure why this is needed.

@JeremiPlazas You claim in your original report that it worked from subpages before. Thus it will be nice if you could add the info what exactly changed in your setup.

Apart from that it is great to see that the extension at least works from regular pages.

JeremiPlazas (talkcontribs)

Also, tested the #createpageifnotex parser function from a subpage on sandbox and that works fine. So something preventing it for me. Version issue?

Kghbln (talkcontribs)

You said that it worked some time. So what changed? Did you upgrade? Did you add another extension?