Last modified: 2014-05-16 20:28:09 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 T61780, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59780 - Fatal exception of type UsageException on 1.23wmf9
Fatal exception of type UsageException on 1.23wmf9
Status: ASSIGNED
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
master
All All
: Low normal (vote)
: ---
Assigned To: Michael Dale
https://he.wikisource.org/wiki/%D7%9E...
:
Depends on:
Blocks:
  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: ---


Attachments

Description Inkbug 2014-01-07 19:12:20 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.
Comment 1 Nemo 2014-01-07 19:32:55 UTC
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
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')
#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}
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

https://gerrit.wikimedia.org/r/106134
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

https://gerrit.wikimedia.org/r/106135
Comment 10 Gerrit Notification Bot 2014-01-07 22:23:49 UTC
Change 106135 merged by jenkins-bot:
Hack to fix bug 59780

https://gerrit.wikimedia.org/r/106135
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

https://gerrit.wikimedia.org/r/106535
Comment 15 Gerrit Notification Bot 2014-01-09 17:15:24 UTC
Change 106535 merged by jenkins-bot:
Hack to fix bug 59780

https://gerrit.wikimedia.org/r/106535
Comment 16 Gerrit Notification Bot 2014-01-09 17:15:40 UTC
Change 106134 merged by jenkins-bot:
Hack to fix bug 59780

https://gerrit.wikimedia.org/r/106134
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.


Navigation
Links