Last modified: 2013-07-16 13:08:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53435, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51435 - SMW\NamespaceExaminer should be able to handle removed namespaces
SMW\NamespaceExaminer should be able to handle removed namespaces
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-16 12:05 UTC by Leonard Wallentin
Modified: 2013-07-16 13:08 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Leonard Wallentin 2013-07-16 12:05:50 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.
Comment 1 MWJames 2013-07-16 12:32:04 UTC
(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() )
Comment 2 Gerrit Notification Bot 2013-07-16 12:52:48 UTC
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
Comment 3 Leonard Wallentin 2013-07-16 12:59:20 UTC
...and we have a new World Record for the quickest bug fix ever! Thanks!
Comment 4 Gerrit Notification Bot 2013-07-16 13:08:35 UTC
Change 73956 merged by jenkins-bot:
(Bug 51435) SMW\NamespaceExaminer return false instead of an Exception

https://gerrit.wikimedia.org/r/73956

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links