Page MenuHomePhabricator

ExternalData doesn't load if $wgDevelopmentWarnings = true or MW version is 1.29
Closed, DeclinedPublic

Description

ExternalData doesn't load, whether $wgLanguageCode = 'en' or $wgLanguageCode = 'ru'.

MediaWiki1.29.3 (0e70436) 01:24, 21 сентября 2018
PHP7.2.7-1+ubuntu17.10.1+deb.sury.org+1 (fpm-fcgi)
MariaDB10.3.8-MariaDB-1:10.3.8+maria~artful-log
LuaSandbox2.0.13-alpha
Lua5.1.5
LilyPond2.18.2
Semantic MediaWiki3.0.0 (abdec88) 04:29, 12 октября 2018GPL-2.0+Делает вашу вики более доступной — для машин и людей (документация в сети)Markus Krötzsch, Jeroen De Dauw, James Hong Kong и другие
[423d1c2d00b176e6268f3c6f] /w/index.php?title=... MWException from line 336 of /var/www/wiki/w/includes/MagicWord.php: Error: invalid magic word 'get_web_data'

Backtrace:

#0 /var/www/wiki/w/includes/MagicWord.php(261): MagicWord->load(string)
#1 /var/www/wiki/w/includes/parser/Parser.php(4858): MagicWord::get(string)
#2 /var/www/wiki/w/extensions/ExternalData/ExternalData.hooks.php(13): Parser->setFunctionHook(string, array)
#3 /var/www/wiki/w/includes/Hooks.php(186): ExternalDataHooks::registerParser(Parser)
#4 /var/www/wiki/w/includes/parser/Parser.php(337): Hooks::run(string, array)
#5 /var/www/wiki/w/includes/cache/MessageCache.php(1113): Parser->firstCallInit()
#6 /var/www/wiki/w/includes/cache/MessageCache.php(1144): MessageCache->getParser()
#7 /var/www/wiki/w/includes/Message.php(1221): MessageCache->parse(string, Title, boolean, boolean, LanguageRu)
#8 /var/www/wiki/w/includes/Message.php(869): Message->parseText(string)
#9 /var/www/wiki/w/includes/Message.php(922): Message->toString(string)
#10 /var/www/wiki/w/includes/htmlform/fields/HTMLTextField.php(34): Message->parse()
#11 /var/www/wiki/w/includes/htmlform/HTMLForm.php(493): HTMLTextField->__construct(array)
#12 /var/www/wiki/w/includes/htmlform/VFormHTMLForm.php(48): HTMLForm::loadInputFromParameters(string, array, VFormHTMLForm)
#13 /var/www/wiki/w/includes/htmlform/HTMLForm.php(338): VFormHTMLForm::loadInputFromParameters(string, array, VFormHTMLForm)
#14 /var/www/wiki/w/includes/libs/ObjectFactory.php(147): HTMLForm->__construct(array, RequestContext)
#15 /var/www/wiki/w/includes/htmlform/HTMLForm.php(283): ObjectFactory::constructClassInstance(string, array)
#16 /var/www/wiki/w/includes/specialpage/LoginSignupSpecialPage.php(667): HTMLForm::factory(string, array, RequestContext)
#17 /var/www/wiki/w/includes/specialpage/AuthManagerSpecialPage.php(400): LoginSignupSpecialPage->getAuthForm(array, string)
#18 /var/www/wiki/w/includes/specialpage/LoginSignupSpecialPage.php(305): AuthManagerSpecialPage->trySubmit()
#19 /var/www/wiki/w/includes/specialpage/SpecialPage.php(522): LoginSignupSpecialPage->execute(NULL)
#20 /var/www/wiki/w/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#21 /var/www/wiki/w/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#22 /var/www/wiki/w/includes/MediaWiki.php(862): MediaWiki->performRequest()
#23 /var/www/wiki/w/includes/MediaWiki.php(523): MediaWiki->main()
#24 /var/www/wiki/w/index.php(43): MediaWiki->run()
#25 {main}

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 30 2018, 5:12 PM

Anybody reads this?

@alex-mashin: Maybe? It's been less than 36 hours since you reported this; please be way more patient. Some people also have a real life (apart from sometimes working on some software) and do not check their projects or mail every single day.

alex-mashin added a comment.EditedNov 3 2018, 2:01 PM

The same story after upgrading to MediaWiki 1.31.1, but the backtrace now involves Visual Editor and ResourceLoader:

PHP message: PHP Stack trace:
PHP message: PHP   1. {main}() /var/www/wiki/w/index.php:0
PHP message: PHP   2. MediaWiki->run() /var/www/wiki/w/index.php:42
PHP message: PHP   3. MWExceptionHandler::handleException() /var/www/wiki/w/includes/MediaWiki.
2018/11/03 20:57:33 [error] 32644#32644: *306 FastCGI sent in stderr: "PHP message: PHP Notice:  "" is not a valid magic word for "get_web_data" [Called from Language::getMagic in /var/www/wiki/w/languages/Language.php at line 3181] in /var/www/wiki/w/includes/debug/MWDebug.php on line 309
PHP message: PHP Stack trace:
PHP message: PHP   1. {main}() /var/www/wiki/w/load.php:0
PHP message: PHP   2. ResourceLoader->respond() /var/www/wiki/w/load.php:51
PHP message: PHP   3. ResourceLoader->getCombinedVersion() /var/www/wiki/w/includes/resourceloader/ResourceLoader.php:759
PHP message: PHP   4. array_map() /var/www/wiki/w/includes/resourceloader/ResourceLoader.php:678
PHP message: PHP   5. ResourceLoader->{closure:/var/www/wiki/w/includes/resourceloader/ResourceLoader.php:663-678}() /var/www/wiki/w/includes/resourceloader/ResourceLoader.php:678
PHP message: PHP   6. ResourceLoaderStartUpModule->getVersionHash() /var/www/wiki/w/includes/resourceloader/ResourceLoader.php:665
PHP message: PHP   7. ResourceLoaderStartUpModule->getDefinitionSummary() /var/www/wiki/w/includes/resourceloader/ResourceLoaderModule.php:831
PHP message: PHP   8. ResourceLoaderStartUpModule->getAllModuleHashes() /var/www/wiki/w/includes/resourceloader/ResourceLoaderStartUpModule.php:422
PHP message: PHP   9. ResourceLoader->getCombinedVersion() /var/www/wiki/w/includes/resourceloader/ResourceLoaderStartUpModule.php:449
PHP message: PHP  10. array_map() /var/www/wiki/w/includes/resourceloader/ResourceLoader.php:678
PHP message: PHP  11. ResourceLoader->{closure:/var/www/wiki/w/includes/resourceloader/ResourceLoader.php:663-678}() /var/www/wiki/w/includes/resourceloader/ResourceLoader.php:678
PHP message: PHP  12. VisualEditorDataModule->getVersionHash() /var/www/wiki/w/includes/resourceloader/ResourceLoader.php:665
PHP message: PHP  13. VisualEditorDataModule->getModuleContent() /var/www/wiki/w/includes/resourceloader/ResourceLoaderModule.php:828
PHP message: PHP  14. VisualEditorDataModule->buildContent() /var/www/wiki/w/includes/resourceloade
Restricted Application added a project: Performance-Team. · View Herald TranscriptNov 3 2018, 2:03 PM

This error happens only if $wgDevelopmentWarnings = true. Don't know if this is ExternalData's or MediaWiki's bug.

However, under MediaWiki 1.29 it doesn't work anyway.

Removing ResourceLoader and VisualEditor projects as get_web_data is provided and defined by ExternalData.

Also see https://lists.wikimedia.org/pipermail/mediawiki-l/2015-February/044096.html

Also see https://lists.wikimedia.org/pipermail/mediawiki-l/2015-February/044096.html

Read the thread, and don't think it is relevant here.

The releases of MediaWiki and ExternalData are the same — REL1_31.

An important fact is that ExternalData is not loadable with wfLoadExtension ('ExternalData'): Warning: Invalid argument supplied for foreach() in /var/www/wiki/w/extensions/ExternalData/ED_Utils.php on line <i>903</i>.

alex-mashin renamed this task from ExternalData doesn't load to ExternalData doesn't load if $wgDevelopmentWarnings = true or MW version is 1.29.Nov 4 2018, 6:02 AM

What is in your line 903, as there is no foreach in https://phabricator.wikimedia.org/diffusion/EXDA/browse/REL1_29/ED_Utils.php$903 ?

It's https://phabricator.wikimedia.org/diffusion/EXDA/browse/REL1_31/ED_Utils.php$903.
This error happens when I try to load the extension under MediaWiki 1.31 with wfLoadExtension ().

alex-mashin added a comment.EditedNov 7 2018, 2:13 PM

Checking out branch 1.32 (MW stayed at 1.31) and running php maintenance/rebuildLocalisationCache.php --force helped. The extension loads with wfLoadExtension ().

alex-mashin closed this task as Resolved.Nov 11 2018, 7:01 AM
Aklapper changed the task status from Resolved to Declined.Nov 11 2018, 12:36 PM

No code change was committed, hence closing as declined.