Last modified: 2014-05-16 20:28:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 59780 - Fatal exception of type UsageException on 1.23wmf9
Fatal exception of type UsageException on 1.23wmf9
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
All All
: Low normal (vote)
: ---
Assigned To: Michael Dale
Depends on:
  Show dependency treegraph
Reported: 2014-01-07 19:12 UTC by Inkbug
Modified: 2014-05-16 20:28 UTC (History)
11 users (show)

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


Description Inkbug 2014-01-07 19:12:20 UTC
When one navigates to 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.
Comment 1 Nemo 2014-01-07 19:32:55 UTC
Also at,_June_2012?uselang=it or,_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
Comment 4 Nemo 2014-01-07 20:07:38 UTC
Fixed for now by the revert:

19:58 logmsgbot: reedy rebuilt wikiversions.cdb and synchronized wikiversions files: Revert All non wikipedias to 1.23wmf9
Comment 5 Sam Reed (reedy) 2014-01-07 21:16:34 UTC
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')
ApiQueryBase->titlePartToKey('Barry_Answering...', 102)
TimedMediaTransformOutput->getHtmlMediaTagOutput(Array, true)
#9 /usr/local/apache/common-local/php-1.23wmf9/includes/Linker.php(853):
#10 /usr/local/apache/common-local/php-1.23wmf9/includes/Linker.php(632):
Linker::makeThumbLink2(Object(Title), Object(ForeignDBFile), Array, Array,
false, false)
Linker::makeImageLink(Object(Parser), Object(Title), Object(ForeignDBFile),
Array, Array, false, false, 4)
Parser->makeImage(Object(Title), 'right|thumb|250...', Object(LinkHolderArray))
Parser->replaceInternalLinks2('?<table class="...')
Parser->replaceInternalLinks('?<table class="...')
Parser->internalParse('{{Info|You are ...')
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):
#19 /usr/local/apache/common-local/php-1.23wmf9/includes/Article.php(708):
#21 /usr/local/apache/common-local/php-1.23wmf9/includes/Wiki.php(441):
#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):
#24 /usr/local/apache/common-local/php-1.23wmf9/includes/Wiki.php(460):
#25 /usr/local/apache/common-local/php-1.23wmf9/index.php(49): MediaWiki->run()
#26 /usr/local/apache/common-local/w/index.php(3):
#27 {main}
Comment 6 Brad Jorsch 2014-01-07 21:41:49 UTC
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.
Comment 7 Michael Dale 2014-01-07 22:15:06 UTC
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 ).
Comment 8 Gerrit Notification Bot 2014-01-07 22:17:49 UTC
Change 106134 had a related patch set uploaded by Reedy:
Hack to fix bug 59780
Comment 9 Gerrit Notification Bot 2014-01-07 22:23:17 UTC
Change 106135 had a related patch set uploaded by Reedy:
Hack to fix bug 59780
Comment 10 Gerrit Notification Bot 2014-01-07 22:23:49 UTC
Change 106135 merged by jenkins-bot:
Hack to fix bug 59780
Comment 11 Sam Reed (reedy) 2014-01-07 23:49:37 UTC
Removing from deployment blockers. Still need fixing properly though
Comment 12 Greg Grossmeier 2014-01-09 15:24:45 UTC
Michael: are you working on the proper fix?
Comment 13 Michael Dale 2014-01-09 16:36:05 UTC
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.
Comment 14 Gerrit Notification Bot 2014-01-09 17:14:55 UTC
Change 106535 had a related patch set uploaded by Reedy:
Hack to fix bug 59780
Comment 15 Gerrit Notification Bot 2014-01-09 17:15:24 UTC
Change 106535 merged by jenkins-bot:
Hack to fix bug 59780
Comment 16 Gerrit Notification Bot 2014-01-09 17:15:40 UTC
Change 106134 merged by jenkins-bot:
Hack to fix bug 59780
Comment 17 Andre Klapper 2014-05-16 20:28:09 UTC
Hack committed ages ago; hence lowering prio&severity here.

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