cookiecutter-mediawiki-extension icon indicating copy to clipboard operation
cookiecutter-mediawiki-extension copied to clipboard

Error: invalid magic word 'something'

Open RobTranquillo opened this issue 6 years ago • 2 comments

Hello and thank you for that project!

This is my first attempt to make a MW extension. The cookiecutter could be so helpful, if there was not a little bug there. I run MW 1.30.0 on centos with php 7.2. and get the following error for my extension created by cookiecutter.

[5e3947cdba779d28c9276de6] /index.php?title=Issues MWException from line 336 of /var/www/html/mw/includes/MagicWord.php: Error: invalid magic word 'something'

Backtrace:

#0 /var/www/html/mw/includes/MagicWord.php(261): MagicWord->load(string) #1 /var/www/html/mw/includes/parser/Parser.php(4812): MagicWord::get(string) #2 /var/www/html/mw/extensions/CalcInTables/CalcInTables.hooks.php(12): Parser->setFunctionHook(string, string) #3 /var/www/html/mw/includes/Hooks.php(177): CalcInTablesHooks::onParserFirstCallInit(Parser) #4 /var/www/html/mw/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL) #5 /var/www/html/mw/includes/parser/Parser.php(337): Hooks::run(string, array) #6 /var/www/html/mw/includes/StubObject.php(111): Parser->firstCallInit() #7 /var/www/html/mw/includes/StubObject.php(137): StubObject->_call(string, array) #8 /var/www/html/mw/includes/cache/MessageCache.php(1127): StubObject->__call(string, array) #9 /var/www/html/mw/includes/cache/MessageCache.php(1103): MessageCache->getParser() #10 /var/www/html/mw/includes/Message.php(1258): MessageCache->transform(string, boolean, Language, Title) #11 /var/www/html/mw/includes/Message.php(874): Message->transformText(string) #12 /var/www/html/mw/includes/Message.php(934): Message->toString(string) #13 /var/www/html/mw/includes/OutputPage.php(950): Message->text() #14 /var/www/html/mw/includes/OutputPage.php(997): OutputPage->setHTMLTitle(Message) #15 /var/www/html/mw/includes/page/Article.php(463): OutputPage->setPageTitle(string) #16 /var/www/html/mw/includes/actions/ViewAction.php(68): Article->view() #17 /var/www/html/mw/includes/MediaWiki.php(499): ViewAction->show() #18 /var/www/html/mw/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title) #19 /var/www/html/mw/includes/MediaWiki.php(851): MediaWiki->performRequest() #20 /var/www/html/mw/includes/MediaWiki.php(523): MediaWiki->main() #21 /var/www/html/mw/index.php(43): MediaWiki->run() #22 {main}

Because i ran MW with the language setting on german i tried to fix it by appending this to ..i18n.magic.php: $magicWords['de'] = array( 'something' => array( 0, 'something' ), );

But even whithout any 'something' command in ..i18n.magic.php the same error occours. I dont know from where it takes this command.

I restart php-cgi and take care, that the LocalSettings.php contains: $wgMainCacheType = CACHE_NONE; $wgCacheDirectory = false;

Thanks in advance Rob

RobTranquillo avatar Apr 13 '18 22:04 RobTranquillo