Page MenuHomePhabricator

TimedText (710) namespace missing on beta enwiki
Closed, ResolvedPublic

Description

http://en.wikipedia.beta.wmflabs.org/wiki/Special:ListFiles

[5ea5c558] /wiki/Special:ListFiles UsageException from line 1460 of /srv/mediawiki/php-master/includes/api/ApiBase.php: Unrecognized value for parameter 'apnamespace': 710

Backtrace:

#0 /srv/mediawiki/php-master/includes/api/ApiBase.php(1144): ApiBase->dieUsage(string, string)
#1 /srv/mediawiki/php-master/includes/api/ApiBase.php(960): ApiBase->parseMultiValue(string, string, boolean, array)
#2 /srv/mediawiki/php-master/includes/api/ApiBase.php(668): ApiBase->getParameterFromSettings(string, array, boolean)
#3 /srv/mediawiki/php-master/includes/api/ApiQuery.php(273): ApiBase->extractRequestParams()
#4 /srv/mediawiki/php-master/includes/api/ApiMain.php(1275): ApiQuery->execute()
#5 /srv/mediawiki/php-master/includes/api/ApiMain.php(397): ApiMain->executeAction()
#6 /srv/mediawiki/php-master/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php(195): ApiMain->execute()
#7 /srv/mediawiki/php-master/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php(83): TextHandler->getLocalTextSources()
#8 /srv/mediawiki/php-master/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(359): TextHandler->getTracks()
#9 /srv/mediawiki/php-master/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(195): TimedMediaTransformOutput->getHtmlMediaTagOutput(array, boolean)
#10 /srv/mediawiki/php-master/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(142): TimedMediaTransformOutput->getImagePopUp()
#11 /srv/mediawiki/php-master/includes/specials/SpecialListfiles.php(464): TimedMediaTransformOutput->toHtml(array)
#12 /srv/mediawiki/php-master/includes/pager/TablePager.php(192): ImageListPager->formatValue(string, string)
#13 /srv/mediawiki/php-master/includes/pager/IndexPager.php(442): TablePager->formatRow(stdClass)
#14 /srv/mediawiki/php-master/includes/pager/TablePager.php(101): IndexPager->getBody()
#15 /srv/mediawiki/php-master/includes/specials/SpecialListfiles.php(56): TablePager->getFullOutput()
#16 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(384): SpecialListFiles->execute(NULL)
#17 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(555): SpecialPage->run(NULL)
#18 /srv/mediawiki/php-master/includes/MediaWiki.php(280): SpecialPageFactory::executePath(Title, RequestContext)
#19 /srv/mediawiki/php-master/includes/MediaWiki.php(731): MediaWiki->performRequest()
#20 /srv/mediawiki/php-master/includes/MediaWiki.php(506): MediaWiki->main()
#21 /srv/mediawiki/php-master/index.php(43): MediaWiki->run()
#22 /srv/mediawiki/w/index.php(3): include(string)
#23 {main}

Event Timeline

Tgr created this task.Jan 15 2016, 12:35 AM
Tgr updated the task description. (Show Details)
Tgr raised the priority of this task from to Unbreak Now!.
Tgr added a subscriber: Tgr.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 15 2016, 12:35 AM
Tgr renamed this task from Special:ListFiles is broken to Special:ListFiles is broken on Beta cluster.Jan 15 2016, 12:39 AM
Tgr lowered the priority of this task from Unbreak Now! to High.
Tgr set Security to None.

Looks like a namespace config issue. Might or might not be relevant to production.

Tgr added a comment.Jan 15 2016, 12:42 AM

Possibly same as T47952.

Tgr renamed this task from Special:ListFiles is broken on Beta cluster to TimedText (710) namespace missing on beta enwiki.Jan 15 2016, 12:44 AM
Tgr added a comment.Jan 15 2016, 1:13 AM
tgr@deployment-bastion:~$ mwscript eval.php --wiki=enwiki
> var_dump($wgExtraNamespaces);
array(10) {
  [100]=>
  string(6) "Portal"
  [101]=>
  string(11) "Portal_talk"
  [108]=>
  string(4) "Book"
  [109]=>
  string(9) "Book_talk"
  [118]=>
  string(5) "Draft"
  [119]=>
  string(10) "Draft_talk"
  [190]=>
  string(9) "Flow_test"
  [191]=>
  string(14) "Flow_test_talk"
  [710]=>
  string(9) "TimedText"
  [711]=>
  string(14) "TimedText_talk"
}

but http://en.wikipedia.beta.wmflabs.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces

It's a repeat of T47031: Some extensions register their namespaces too late, caused by https://gerrit.wikimedia.org/r/#/c/198486/.

SessionManager→CentralAuth is triggering MWNamespace::getCanonicalNamespace()'s cache to now be populated before TMH sets $wgExtraNamespaces, which means $wgContLang->getNamespaces() no longer sees the TMH namespaces as validly existing. It doesn't happen via eval.php because that doesn't set up a session.

TheDJ added a comment.Jan 16 2016, 2:21 AM

Hmm, let's just stop conditionally defining those namespaces. Not really feasible to have that long term anyways.

TheDJ added a comment.EditedJan 16 2016, 2:37 AM

Oh.. the namespace id is actually configurable ... $wgTimedTextNS = 710;, because commons uses a different ID (210). I knew that would come back to haunt us some day...

Perhaps we can short term flip back the namespace defines to happen in AfterParserCache hook again ? Long term, it's probably about time we move all that TimedText content on Commons to ns 710 ?

Perhaps we can short term flip back the namespace defines to happen in AfterParserCache hook again ?

SetupAfterCache. That should work to fix this bug, yes. We'll want to get the fix merged before 1.27.0-wmf.11 is cut so this bug doesn't occur on the production wikis.

You probably don't need to move everything else that TimedMediaHandlerHooks::register() does to SetupAfterCache if you don't want to completely undo T90282, just the namespace bit.

Change 264459 had a related patch set uploaded (by TheDJ):
Move TimedText NS id defines back into ParserAfterCache

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

TheDJ added a comment.Jan 16 2016, 2:22 PM

Right. Hope that will help. I'm still on vacation, so if someone would be so kind to look after this from this stage on ?

Right. Hope that will help. I'm still on vacation, so if someone would be so kind to look after this from this stage on ?

There's one simple error in the patch, otherwise it looks good.

Change 264459 merged by jenkins-bot:
Move TimedText NS id defines back into ParserAfterCache

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

Anomie closed this task as Resolved.Jan 17 2016, 3:35 PM
Anomie assigned this task to TheDJ.

Change 265923 had a related patch set uploaded (by Southparkfan):
Move TimedText NS id defines back into ParserAfterCache

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

Change 265923 merged by jenkins-bot:
Move TimedText NS id defines back into ParserAfterCache

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