Last modified: 2014-11-04 17:17:30 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 T74951, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72951 - uselang=user on api breaks in ULS
uselang=user on api breaks in ULS
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UniversalLanguageSelector (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Brad Jorsch
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-04 15:50 UTC by Umherirrender
Modified: 2014-11-04 17:17 UTC (History)
15 users (show)

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


Attachments

Description Umherirrender 2014-11-04 15:50:49 UTC
https://en.wikipedia.org/w/api.php?uselang=user gives a error page instead of api help in the user lang. I am not sure, if this bug is in ULS or API.


If you report this error to the Wikimedia System Administrators, please include the details below.

PHP fatal error in /srv/mediawiki/php-1.25wmf5/extensions/UniversalLanguageSelector/UniversalLanguageSelector.hooks.php line 199: 
 Argument 3 passed to UniversalLanguageSelectorHooks::getLanguage() must be an instance of RequestContext, instance of ApiMain given
Comment 1 Brad Jorsch 2014-11-04 16:09:16 UTC
It depends on whether the $context parameter to 'UserGetLanguageObject' is really supposed to be a RequestContext, or if any IContextSource implementation should be accepted. If the former, API; if the latter, ULS and docs/hooks.txt.

I note that ULS only uses it for $context->getRequest(), so any IContextSource would do. And CentralAuth is also calling the hook while passing something that is only guaranteed to be an IContextSource (specifically whatever is returned by SpecialPage::getContext()).
Comment 2 Gerrit Notification Bot 2014-11-04 16:25:33 UTC
Change 170938 had a related patch set uploaded by Anomie:
UserGetLanguageObject hook should accept any IContextSource

https://gerrit.wikimedia.org/r/170938
Comment 3 Gerrit Notification Bot 2014-11-04 16:28:14 UTC
Change 170940 had a related patch set uploaded by Anomie:
UserGetLanguageObject hook should accept any IContextSource

https://gerrit.wikimedia.org/r/170940
Comment 4 Gerrit Notification Bot 2014-11-04 16:32:00 UTC
Change 170938 merged by jenkins-bot:
UserGetLanguageObject hook should accept any IContextSource

https://gerrit.wikimedia.org/r/170938
Comment 5 Gerrit Notification Bot 2014-11-04 16:34:32 UTC
Change 170944 had a related patch set uploaded by Anomie:
UserGetLanguageObject hook should accept any IContextSource

https://gerrit.wikimedia.org/r/170944
Comment 6 Gerrit Notification Bot 2014-11-04 16:35:03 UTC
Change 170945 had a related patch set uploaded by Anomie:
UserGetLanguageObject hook should accept any IContextSource

https://gerrit.wikimedia.org/r/170945
Comment 7 Gerrit Notification Bot 2014-11-04 16:39:50 UTC
Change 170944 merged by jenkins-bot:
UserGetLanguageObject hook should accept any IContextSource

https://gerrit.wikimedia.org/r/170944
Comment 8 Gerrit Notification Bot 2014-11-04 16:39:54 UTC
Change 170945 merged by jenkins-bot:
UserGetLanguageObject hook should accept any IContextSource

https://gerrit.wikimedia.org/r/170945
Comment 9 Brad Jorsch 2014-11-04 16:48:01 UTC
The bug itself is fixed, and was backported during the SWAT window that was conveniently still open. The doc fix for hooks.txt is still outstanding, but that's just bug 1.
Comment 10 Gerrit Notification Bot 2014-11-04 17:17:30 UTC
Change 170940 merged by jenkins-bot:
UserGetLanguageObject hook should accept any IContextSource

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

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


Navigation
Links