Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: invalid magic word 'something' #2

Open
RobTranquillo opened this issue Apr 13, 2018 · 2 comments
Open

Error: invalid magic word 'something' #2

RobTranquillo opened this issue Apr 13, 2018 · 2 comments

Comments

@RobTranquillo
Copy link

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
Copy link
Author

This is the place where the error starts. If you change "something" in L13 to something else, maybe to "foobar" the upper error says "Error: invalid magic word 'foobar'".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants