Last modified: 2014-05-16 20:28:09 UTC
When one navigates to https://he.wikisource.org/wiki/%D7%9E%D7%99%D7%95%D7%97%D7%93:%D7%A7%D7%91%D7%A6%D7%99%D7%9D_%D7%97%D7%A1%D7%A8%D7%99_%D7%A7%D7%98%D7%92%D7%95%D7%A8%D7%99%D7%94 the title of the page is "שגיאה פנימית – {{SITENAME}}", instead of "קבצים חסרי קטגוריה", and it shows a red box that says "[e9e91600] 2014-01-07 19:06:11: Fatal exception of type UsageException", instead of showing the list of uncategorized files.
Also at https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Report,_June_2012?uselang=it or https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Report,_September_2012?uselang=it [4f20ef51] 2014-01-07 19:32:17: Fatal exception of type UsageException [97067b3f] 2014-01-07 19:30:55: Fatal exception of type UsageException
Fixed for now by the revert: 19:58 logmsgbot: reedy rebuilt wikiversions.cdb and synchronized wikiversions files: Revert All non wikipedias to 1.23wmf9
So I got a double comment with the same thing pasted twice. 2 comments hidden, respost here: reedy@fluorine:/a/mw-log$ grep a08fd93d exception.log -A 40 2014-01-07 19:41:24 mw1078 metawiki: [a08fd93d] /wiki/Wikimedia_Foundation_Report,_June_2012?uselang=it Exception from line 1335 of /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiBase.php: Bad title "Barry_Answering_Questions_6_-_Computer.theora.ogv" #0 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiBase.php(1892): ApiBase->dieUsage('Bad title "Barr...', 'invalidtitle') #1 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiQueryBase.php(494): ApiBase->dieUsageMsg(Array) #2 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiQueryAllPages.php(96): ApiQueryBase->titlePartToKey('Barry_Answering...', 102) #3 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiQueryAllPages.php(39): ApiQueryAllPages->run() #4 /usr/local/apache/common-local/php-1.23wmf9/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php(193): ApiQueryAllPages->execute() #5 /usr/local/apache/common-local/php-1.23wmf9/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php(65): TextHandler->getForeignDBTextSources() #6 /usr/local/apache/common-local/php-1.23wmf9/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(257): TextHandler->getTracks() #7 /usr/local/apache/common-local/php-1.23wmf9/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(175): TimedMediaTransformOutput->getHtmlMediaTagOutput(Array, true) #8 /usr/local/apache/common-local/php-1.23wmf9/extensions/TimedMediaHandler/TimedMediaTransformOutput.php(138): TimedMediaTransformOutput->getImagePopUp() #9 /usr/local/apache/common-local/php-1.23wmf9/includes/Linker.php(853): TimedMediaTransformOutput->toHtml(Array) #10 /usr/local/apache/common-local/php-1.23wmf9/includes/Linker.php(632): Linker::makeThumbLink2(Object(Title), Object(ForeignDBFile), Array, Array, false, false) #11 /usr/local/apache/common-local/php-1.23wmf9/includes/parser/Parser.php(5478): Linker::makeImageLink(Object(Parser), Object(Title), Object(ForeignDBFile), Array, Array, false, false, 4) #12 /usr/local/apache/common-local/php-1.23wmf9/includes/parser/Parser.php(2088): Parser->makeImage(Object(Title), 'right|thumb|250...', Object(LinkHolderArray)) #13 /usr/local/apache/common-local/php-1.23wmf9/includes/parser/Parser.php(1825): Parser->replaceInternalLinks2('?<table class="...') #14 /usr/local/apache/common-local/php-1.23wmf9/includes/parser/Parser.php(1230): Parser->replaceInternalLinks('?<table class="...') #15 /usr/local/apache/common-local/php-1.23wmf9/includes/parser/Parser.php(395): Parser->internalParse('{{Info|You are ...') #16 /usr/local/apache/common-local/php-1.23wmf9/includes/content/WikitextContent.php(306): Parser->parse('{{Info|You are ...', Object(Title), Object(ParserOptions), true, true, 5948548) #17 /usr/local/apache/common-local/php-1.23wmf9/includes/WikiPage.php(3556): WikitextContent->getParserOutput(Object(Title), 5948548, Object(ParserOptions)) #18 /usr/local/apache/common-local/php-1.23wmf9/includes/PoolCounter.php(222): PoolWorkArticleView->doWork() #19 /usr/local/apache/common-local/php-1.23wmf9/includes/Article.php(708): PoolCounterWork->execute() #20 /usr/local/apache/common-local/php-1.23wmf9/includes/actions/ViewAction.php(44): Article->view() #21 /usr/local/apache/common-local/php-1.23wmf9/includes/Wiki.php(441): ViewAction->show() #22 /usr/local/apache/common-local/php-1.23wmf9/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title)) #23 /usr/local/apache/common-local/php-1.23wmf9/includes/Wiki.php(596): MediaWiki->performRequest() #24 /usr/local/apache/common-local/php-1.23wmf9/includes/Wiki.php(460): MediaWiki->main() #25 /usr/local/apache/common-local/php-1.23wmf9/index.php(49): MediaWiki->run() #26 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...') #27 {main}
The root of the bug is apparently that TimedMediaHandler is doing something dumb in handlers/TextHandler/TextHandler.php: it instantiates an API module, but subclassed to point its getDB() method at some other wiki's DB, and then calls that API module hoping that it will be able to construct a workable Title object when passed a namespace number that doesn't even exist on the local wiki. Why in the world didn't they just make the appropriate database query themselves? That would've been a whole lot more straightforward than this hacky mess. git blame blames Jan Gerber for introducing this code in Gerrit change #16885, so CCing him on this bug report.
The idea was code reuse across instances that needed to request with DB vs request via HTTP over the web. If building a lot of services that aim to work with local, foreign db, foreign api via HTTP, it is convenient to use the same API. Also an API based access to data in theory gives you more schema / data retrieval flexibility, since your client code is hitting the same ~stable~ services as external clients, you exercise the same code paths, have less php class coupling to specific methods, only have to learn "one api" etc. anyway, Seemed like a good idea at the time ;) Bu seems like its run into issues as is not the standard approach and we should update it to query the db directly ( where it can ).
Change 106134 had a related patch set uploaded by Reedy: Hack to fix bug 59780 https://gerrit.wikimedia.org/r/106134
Change 106135 had a related patch set uploaded by Reedy: Hack to fix bug 59780 https://gerrit.wikimedia.org/r/106135
Change 106135 merged by jenkins-bot: Hack to fix bug 59780 https://gerrit.wikimedia.org/r/106135
Removing from deployment blockers. Still need fixing properly though
Michael: are you working on the proper fix?
yes I can in the next few days. Its tricky to fully test without some work on the environment setup. Because it has to cross query another wiki database per the shared file's origin.
Change 106535 had a related patch set uploaded by Reedy: Hack to fix bug 59780 https://gerrit.wikimedia.org/r/106535
Change 106535 merged by jenkins-bot: Hack to fix bug 59780 https://gerrit.wikimedia.org/r/106535
Change 106134 merged by jenkins-bot: Hack to fix bug 59780 https://gerrit.wikimedia.org/r/106134
Hack committed ages ago; hence lowering prio&severity here.