Page MenuHomePhabricator

Double query string parameters in EntityData request
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:
Loading: http://default.web.mw.localhost:8080/mediawiki/index.php?title=Item:Q1&useformat=mobile

With as far as I can tell a clean set up using mediawiki-docker-dev

Actual Results:
Results in termbox not loading and:
Failed to load resource: the server responded with a status of 400 (Bad Request) http://default.web.mw.localhost:8080/mediawiki/index.php?title=Special:EntityData/Q1.json?revision=11

Notice the odd double question mark

Expected Results:
Termbox loads fully. No Errors in the console

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterUse URL for ajax EntityData
mediawiki/extensions/Wikibase : masterUse mw.uri for calling the Special:EntityData instead
mediawiki/extensions/Wikibase : masterAvoid double query string parameters in EntityData request

Event Timeline

Tarrow created this task.Jul 18 2019, 11:46 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 18 2019, 11:46 AM

git bisecting on Wikibase shows that the problem commit was: I9a96f290f6719cc82767d6d0024daed3f25153ba

Change 524202 had a related patch set uploaded (by Tarrow; owner: Tarrow):
[mediawiki/extensions/Wikibase@master] Use URL for ajax EntityData

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

we might need a polyfill for URL though https://www.npmjs.com/package/url-polyfill as IE does not support URL API (if we care about IE11 or before)

Change 524249 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Use mw.uri for calling the Special:EntityData instead

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

we might need a polyfill for URL though https://www.npmjs.com/package/url-polyfill as IE does not support URL API (if we care about IE11 or before)

That would be cool; there is a ticket about having it in general in Mediawiki T103379

I'm not sure how much faff it would be to do this first. @Ladsgroup has done a similar thing using the homebrewed mediawiki.Uri()

Change 524316 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Avoid double query string parameters in EntityData request

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

Change 524249 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use mw.uri for calling the Special:EntityData instead

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

Change 524316 abandoned by Ladsgroup:
Avoid double query string parameters in EntityData request

Reason:
Ic21bd3a9db41cd5853fab7fb876f1c0b4141ad3e

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

Change 524202 abandoned by Tarrow:
Use URL for ajax EntityData

Reason:
can't use URL yet

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

Ladsgroup closed this task as Resolved.Oct 23 2019, 11:12 AM
Ladsgroup claimed this task.
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptOct 23 2019, 11:12 AM