Page MenuHomePhabricator

Fatal exception of type UsageException on 1.23wmf9
Closed, ResolvedPublic

Description

Author: inkbug200

Description:
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.


Version: master
Severity: normal
URL: 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

Details

Reference
bz59780

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:26 AM
bzimport added a project: TimedMediaHandler.
bzimport set Reference to bz59780.
bzimport created this task.Jan 7 2014, 7:12 PM

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

Reedy added a comment.Jan 7 2014, 7:42 PM

content hidden as private in Bugzilla

Reedy added a comment.Jan 7 2014, 7:42 PM

content hidden as private in Bugzilla

Fixed for now by the revert:

19:58 logmsgbot: reedy rebuilt wikiversions.cdb and synchronized wikiversions files: Revert All non wikipedias to 1.23wmf9

Reedy added a comment.Jan 7 2014, 9:16 PM

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}

Anomie added a comment.Jan 7 2014, 9:41 PM

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.

mdale wrote:

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

Reedy added a comment.Jan 7 2014, 11:49 PM

Removing from deployment blockers. Still need fixing properly though

greg added a comment.Jan 9 2014, 3:24 PM

Michael: are you working on the proper fix?

mdale wrote:

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.

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:11 PM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:11 PM
Paladox closed this task as Declined.Oct 21 2015, 8:19 PM
Paladox claimed this task.
Paladox added a subscriber: Paladox.

Declining since in the commit box it mentions going 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 and you would see a red box with the error well the error is no longer there so presuming it was fixed or changed.

Please reopen if the problem still happends or I should not have closed this.

Paladox removed Paladox as the assignee of this task.Oct 21 2015, 8:19 PM
Paladox set Security to None.
Anomie reopened this task as Open.Oct 21 2015, 10:21 PM

@Paladox, if you would have read the whole bug report (T61780#618176 in particular) you'd have seen that this was kept open for making a non-hacky fix for the issue in TimedMediaHandler.

Sorry. I only read the description.

TheDJ claimed this task.May 19 2016, 3:31 PM
TheDJ moved this task from Backlog to Doing on the TimedMediaHandler board.

Change 289976 had a related patch set uploaded (by TheDJ):
[WIP] Rewrite discovery of TimedText tracks

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

Change 289976 merged by jenkins-bot:
Rewrite discovery of TimedText tracks

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

Change 314856 had a related patch set uploaded (by Paladox):
Rewrite discovery of TimedText tracks

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

Change 314862 had a related patch set uploaded (by Brion VIBBER):
WIP: Rewrite discovery of TimedText tracks

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

Change 314862 merged by jenkins-bot:
Rewrite discovery of TimedText tracks

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

Change 314856 abandoned by Reedy:
Rewrite discovery of TimedText tracks

Reason:
https://gerrit.wikimedia.org/r/#/c/314862/

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

TheDJ closed this task as Resolved.Oct 14 2016, 7:27 PM
TheDJ moved this task from Doing to Done on the TimedMediaHandler board.
TheDJ removed a project: Patch-For-Review.

The root issue was solved. This no longer uses ForeignApi. This will be followed up by the usage of a new API to list timedtext tracks: T122736: Provide API to detect TimedText for a video