Page MenuHomePhabricator

PageForms + Flow leads to "invalid magic word 'default_form'" error
Open, HighPublic

Description

The extension PageForms gives a internal error [1f058b3f1c8f40dec285912d] 2017-04-16 18:58:50: Fatal exception of type MWException

2017-04-16 19:00:52 mw1 extloadwiki: [2c8b631ccd29cbd5c7ea70fa] [no req]   MWException from line 335 of /srv/mediawiki/w/includes/MagicWord.php: Error: invalid magic word 'default_form'
#0 /srv/mediawiki/w/includes/MagicWord.php(260): MagicWord->load(string)
#1 /srv/mediawiki/w/includes/parser/Parser.php(4823): MagicWord::get(string)
#2 /srv/mediawiki/w/extensions/PageForms/includes/PF_Hooks.php(135): Parser->setFunctionHook(string, array)
#3 [internal function]: PFHooks::registerFunctions(Parser)
#4 /srv/mediawiki/w/includes/Hooks.php(195): call_user_func_array(string, array)
#5 /srv/mediawiki/w/includes/parser/Parser.php(333): Hooks::run(string, array)
#6 /srv/mediawiki/w/includes/cache/MessageCache.php(1072): Parser->firstCallInit()
#7 /srv/mediawiki/w/includes/cache/MessageCache.php(1049): MessageCache->getParser()
#8 /srv/mediawiki/w/includes/Message.php(1172): MessageCache->transform(string, boolean, Language, NULL)
#9 /srv/mediawiki/w/includes/Message.php(833): Message->transformText(string)
#10 /srv/mediawiki/w/includes/Message.php(902): Message->toString()
#11 /srv/mediawiki/w/includes/user/User.php(869): Message->text()
#12 /srv/mediawiki/w/includes/user/User.php(1081): User::isUsableName(string)
#13 /srv/mediawiki/w/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php(163): User::getCanonicalName(string, string)
#14 /srv/mediawiki/w/includes/auth/AuthManager.php(788): MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider->testUserCanAuthenticate(string)
#15 /srv/mediawiki/w/includes/user/User.php(683): MediaWiki\Auth\AuthManager->userCanAuthenticate(string)
#16 /srv/mediawiki/w/extensions/Flow/includes/TalkpageManager.php(250): User::newSystemUser(string, array)
#17 /srv/mediawiki/w/extensions/Flow/includes/Conversion/Utils.php(448): Flow\TalkpageManager->getTalkpageManager()
#18 /srv/mediawiki/w/extensions/Flow/includes/Conversion/Utils.php(304): Flow\Conversion\Utils::generateForwardedCookieForCli()
#19 /srv/mediawiki/w/extensions/Flow/includes/Conversion/Utils.php(243): Flow\Conversion\Utils::getVRSObject()
#20 /srv/mediawiki/w/extensions/Flow/includes/Conversion/Utils.php(219): Flow\Conversion\Utils::getServiceClient()
#21 /srv/mediawiki/w/extensions/Flow/Hooks.php(142): Flow\Conversion\Utils::isParsoidConfigured()
#22 [internal function]: FlowHooks::initFlowExtension()
#23 /srv/mediawiki/w/includes/Setup.php(850): call_user_func(string)
#24 /srv/mediawiki/w/maintenance/doMaintenance.php(98): require_once(string)
#25 /srv/mediawiki/w/maintenance/rebuildLocalisationCache.php(181): require_once(string)
#26 {main}

Event Timeline

Extension is not working at all, I think it should be High priority

@Fz-29 I don't know but we're running on stable 1.28 and it's not working.

What version of Page Forms are you running?

As I said the stable REL1_28 version.

@Reception123: For future reference, please follow https://mediawiki.org/wiki/How_to_report_a_bug and always include exact MediaWiki and extension version information.
Also see https://phabricator.miraheze.org/T1489 where you already reported this problem.

Aklapper renamed this task from PageForms errors to PageForms Error: invalid magic word 'default_form'.Apr 17 2017, 10:13 AM

I know, but I figured since it is not a local problem it must be dealt by upstream. Is any more information necessary here? I have provided the version, the error and the error message.

@Aklapper Do you know what the issue is? Can it be fixed/maybe backported to 1.28 as there's still a few months still stable and as the extension doesn't work at all it should be IMO.

@Reception123 - you should generally not use the "REL" versions of Page Forms - they are not an official release, and just represent a random snapshot in time. Using the latest version is probably a better bet. Though I don't know if that's the issue here.

This also may be something specific to the combination of Flow and Page Forms.

What were you doing when you got this error - calling update.php?

@Yaron_Koren We are a wiki farm and we use the stable version of extensions. I got this error after simply installing the extension. I will try it on a wiki without flow.

Unfortunately there are some problems with testing this. If you want you can change this task to just be a interaction with another extension problem.

Okay - well, "REL1_28" is not the stable version of Page Forms; it could contain any number of bugs. The stable version is 4.1.

Barring any further information, I would have to guess that is an issue with Page Forms + Flow... I haven't heard of anyone else using them together, so maybe that's it.

Yaron_Koren renamed this task from PageForms Error: invalid magic word 'default_form' to PageForms + Flow leads to "invalid magic word 'default_form'" error.Apr 17 2017, 3:22 PM

I will try the master version and see if there are still errors.

Unfortunately the master branch is the same.

An instance of MW 1.31.5 running on PHP 7.3.16-1+ubuntu18.04.1+deb.sury.org+1 (apache2handler) has just started to exhibit this exception after I upgraded from PF 4.7 to 4.8.

[5c424fca0b973708eb4db9b7] /%D9%88%D9%8A%D9%83%D9%8A:%D8%AE%D8%B7%D8%A9_%D8%AA%D8%B7%D9%88%D9%8A%D8%B1_%D8%A7%D9%84%D9%85%D8%AD%D8%AA%D9%88%D9%89 MWException from line 355 of /srv/src/mediawiki/1.31.5/includes/MagicWord.php: Error: invalid magic word 'default_form'

Backtrace:

#0 /srv/src/mediawiki/1.31.5/includes/MagicWord.php(280): MagicWord->load(string)
#1 /srv/src/mediawiki/1.31.5/includes/parser/Parser.php(4848): MagicWord::get(string)
#2 /srv/src/mediawiki/extensions/1.31/mediawiki-extensions-PageForms-4.8/includes/PF_Hooks.php(163): Parser->setFunctionHook(string, array)
#3 /srv/src/mediawiki/1.31.5/includes/Hooks.php(177): PFHooks::registerFunctions(Parser)
#4 /srv/src/mediawiki/1.31.5/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#5 /srv/src/mediawiki/1.31.5/includes/parser/Parser.php(336): Hooks::run(string, array)
#6 /srv/src/mediawiki/1.31.5/includes/StubObject.php(112): Parser->firstCallInit()
#7 /srv/src/mediawiki/1.31.5/includes/StubObject.php(138): StubObject->_call(string, array)
#8 /srv/src/mediawiki/1.31.5/includes/cache/MessageCache.php(1105): StubObject->__call(string, array)
#9 /srv/src/mediawiki/1.31.5/includes/cache/MessageCache.php(1081): MessageCache->getParser()
#10 /srv/src/mediawiki/1.31.5/includes/Message.php(1273): MessageCache->transform(string, boolean, LanguageAr, Title)
#11 /srv/src/mediawiki/1.31.5/includes/Message.php(874): Message->transformText(string)
#12 /srv/src/mediawiki/1.31.5/includes/Message.php(934): Message->toString(string)
#13 /srv/src/mediawiki/1.31.5/includes/OutputPage.php(902): Message->text()
#14 /srv/src/mediawiki/1.31.5/includes/OutputPage.php(949): OutputPage->setHTMLTitle(Message)
#15 /srv/src/mediawiki/1.31.5/includes/page/Article.php(470): OutputPage->setPageTitle(string)
#16 /srv/src/mediawiki/1.31.5/includes/actions/ViewAction.php(68): Article->view()
#17 /srv/src/mediawiki/1.31.5/includes/MediaWiki.php(500): ViewAction->show()
#18 /srv/src/mediawiki/1.31.5/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#19 /srv/src/mediawiki/1.31.5/includes/MediaWiki.php(861): MediaWiki->performRequest()
#20 /srv/src/mediawiki/1.31.5/includes/MediaWiki.php(524): MediaWiki->main()
#21 /srv/src/mediawiki/1.31.5/index.php(42): MediaWiki->run()
#22 {main}

The exception occures in one of two wikis sharing the same codebase. The affected wiki has Flow enabled (and flawed!)

Disabling Flow resolves the issue. So does downgrading to PageForms 4.7