Topic on Project:Support desk

Jump to navigation Jump to search

[RESOLVED] upgrading from 1.19.2 to 1.20.x Error: invalid magic word 'speciale'

Bc619 (talkcontribs)

Redhat Enterprise 6.3 PHP 5.3.3 MYSQL Ver 14.14 Distrib 5.1.66

I can update from 1.19.2 to 1.19.3 just fine. But when I attempt to update to 1.20.0/1/2 I get this same error when I try to load a page:

Error: invalid magic word 'speciale'


  1. 0 /var/www/html/web/wikitest/includes/MagicWord.php(236): MagicWord->load('speciale')
  2. 1 /var/www/html/web/wikitest/includes/parser/Parser.php(4765): MagicWord::get('speciale')
  3. 2 /var/www/html/web/wikitest/includes/parser/CoreParserFunctions.php(74): Parser->setFunctionHook('speciale', Array)
  4. 3 /var/www/html/web/wikitest/includes/parser/Parser.php(253): CoreParserFunctions::register(Object(Parser))
  5. 4 [internal function]: Parser->firstCallInit()
  6. 5 /var/www/html/web/wikitest/includes/StubObject.php(79): call_user_func_array(Array, Array)
  7. 6 /var/www/html/web/wikitest/includes/StubObject.php(99): StubObject->_call('firstCallInit', Array)
  8. 7 /var/www/html/web/wikitest/includes/cache/MessageCache.php(829): StubObject->__call('firstCallInit', Array)
  9. 8 /var/www/html/web/wikitest/includes/cache/MessageCache.php(829): StubObject->firstCallInit()
  10. 9 /var/www/html/web/wikitest/includes/cache/MessageCache.php(807): MessageCache->getParser()
  11. 10 /var/www/html/web/wikitest/includes/Message.php(618): MessageCache->transform('$1 - {{SITENAME...', true, Object(Language), Object(Title))
  12. 11 /var/www/html/web/wikitest/includes/Message.php(436): Message->transformText('$1 - {{SITENAME...')
  13. 12 /var/www/html/web/wikitest/includes/Message.php(476): Message->toString()
  14. 13 /var/www/html/web/wikitest/includes/OutputPage.php(790): Message->text()
  15. 14 /var/www/html/web/wikitest/includes/OutputPage.php(833): OutputPage->setHTMLTitle(Object(Message))
  16. 15 /var/www/html/web/wikitest/includes/Article.php(485): OutputPage->setPageTitle('Home')
  17. 16 /var/www/html/web/wikitest/includes/actions/ViewAction.php(37): Article->view()
  18. 17 /var/www/html/web/wikitest/includes/Wiki.php(427): ViewAction->show()
  19. 18 /var/www/html/web/wikitest/includes/Wiki.php(304): MediaWiki->performAction(Object(Article))
  20. 19 /var/www/html/web/wikitest/includes/Wiki.php(536): MediaWiki->performRequest()
  21. 20 /var/www/html/web/wikitest/includes/Wiki.php(446): MediaWiki->main()
  22. 21 /var/www/html/web/wikitest/index.php(59): MediaWiki->run()
  23. 22 {main}

This is a clean installation with no extensions and the default vector skin. I overwrite my old files like so: tar xvzf mediawiki-1.20.2.tar.gz -C /path/to/your/wiki/ --strip-components=1

Then run "php update.php" in the maintenance directory. Then when I go to the home page (or any page) I get the above error. I can overwrite the files back to 1.19.3 and then run update.php and it will go back to working again, but any 1.20.x version will not work.

MarkAHershberger (talkcontribs)
Bc619 (talkcontribs)

I actually read that before I posted. There's no solution presented there.

Bc619 (talkcontribs)

In this file wiki-folder/languages/messages/MessagesEn.php the line exists in the magic words array:

'speciale' => array( 0, 'speciale' ),

So I'm not sure why this error (Error: invalid magic word 'speciale') even comes up.

Bc619 (talkcontribs)

I finally figured out the solution. Since the files in the /languages/messages folder are cached, I tried running /maintenance/rebuildLocalisationCache.php. Upon running this, I noticed that it rebuilt all the languages except for 'en'!!!!??? (I guess maybe because that was my default language so it felt it didn't need to be rebuilt???) But in 1.20, I believe this line was added to MessagesEn.php: "'speciale' => array( 0, 'speciale' )," and since 'en' was not getting rebuilt, the wiki was never seeing the new value 'speciale'. So I ran rebuildLocalisationCache.php again but this time with the --force parameter to force a rebuild off all languages:

php rebuildLocalisationCache.php --force

The above command took a while to complete but...Now my website works after updating!!!! (talkcontribs)

Reply to "[RESOLVED] upgrading from 1.19.2 to 1.20.x Error: invalid magic word 'speciale'" How to fix it?

Ciencia Al Poder (talkcontribs)

If you use memcached, clear all the memcached data (for example, restarting the memcached service)

Also, run rebuildLocalisationCache.php --force