Last modified: 2013-07-16 13:08:35 UTC
After removing a namespace that used to have semantics enabled (yes, I did run the semantic update script, twice), I get the following error on trying to update the link cache with refreshLinks.php (the removed namespace was 554): 554 is not a valid namespace Backtrace: #0 /var/www/w/extensions/SemanticMediaWiki/includes/ParserTextProcessor.php(120): SMW\NamespaceExaminer->isSemanticEnabled(554) #1 /var/www/w/extensions/SemanticMediaWiki/SemanticMediaWiki.hooks.php(692): SMW\ParserTextProcessor->parse('#REDIRECT [[:Ka...') #2 [internal function]: SMWHooks::onInternalParseBeforeLinks(Object(Parser), '#REDIRECT [[:Ka...', Object(StripState)) #3 /var/www/w/includes/Hooks.php(199): call_user_func_array('SMWHooks::onInt...', Array) #4 /var/www/w/includes/GlobalFunctions.php(3835): Hooks::run('InternalParseBe...', Array) #5 /var/www/w/includes/parser/Parser.php(1161): wfRunHooks('InternalParseBe...', Array) #6 /var/www/w/includes/parser/Parser.php(385): Parser->internalParse('#REDIRECT [[:Ka...') #7 /var/www/w/includes/content/WikitextContent.php(300): Parser->parse('#REDIRECT [[:Ka...', Object(Title), Object(ParserOptions), true, true, NULL) #8 /var/www/w/includes/content/AbstractContent.php(239): WikitextContent->getParserOutput(Object(Title), NULL, NULL, false) #9 /var/www/w/maintenance/refreshLinks.php(244): AbstractContent->getSecondaryDataUpdates(Object(Title)) #10 /var/www/w/maintenance/refreshLinks.php(172): RefreshLinks::fixLinksFromArticle(2911) #11 /var/www/w/maintenance/refreshLinks.php(53): RefreshLinks->doRefreshLinks(1, false, 0, 0, false, false) #12 /var/www/w/maintenance/doMaintenance.php(114): RefreshLinks->execute() #13 /var/www/w/maintenance/refreshLinks.php(319): require_once('/var/www/w/main...') #14 {main} I guess SMW\NamespaceExaminer simply forgets to check that the namespace actually extists.
(In reply to comment #0) > After removing a namespace that used to have semantics enabled (yes, I did > run > the semantic update script, twice), I get the following error on trying to > update the link cache with refreshLinks.php (the removed namespace was 554): Interesting. > I guess SMW\NamespaceExaminer simply forgets to check that the namespace > actually extists. It does check if the namespace exists. !in_array( $namespace, MWNamespace::getValidNamespaces() )
Change 73956 had a related patch set uploaded by Mwjames: (Bug 51435) SMW\NamespaceExaminer return false instead of an Exception https://gerrit.wikimedia.org/r/73956
...and we have a new World Record for the quickest bug fix ever! Thanks!
Change 73956 merged by jenkins-bot: (Bug 51435) SMW\NamespaceExaminer return false instead of an Exception https://gerrit.wikimedia.org/r/73956