Page MenuHomePhabricator

mediawiki.Uri: Default URI not updated after pushState
Closed, ResolvedPublic

Description

>>> new mw.Uri().toString()
"http://127.0.0.1/wiki/Main_Page"
>>> window.history.pushState({}, document.title, 'http://127.0.0.1/foo')
undefined
>>> window.location.href
"http://127.0.0.1/foo"
>>> new mw.Uri().toString()
"http://127.0.0.1/wiki/Main_Page"

WTF?

Seems to be because defaultUri is cached once and used forever in the mw.Uri constructor.

Details

Reference
bz72334
Related Gerrit Patches:

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:55 AM
bzimport set Reference to bz72334.
bzimport added a subscriber: Unknown Object (MLST).
Catrope created this task.Oct 21 2014, 9:44 PM
Krinkle claimed this task.Dec 1 2014, 10:39 PM

Change 177076 had a related patch set uploaded (by Krinkle):
mediawiki.Uri: Implement support for a mutable defaultUri

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

Patch-For-Review

Krinkle updated the task description. (Show Details)Dec 2 2014, 9:10 PM
Krinkle set Security to None.
Krinkle removed a subscriber: Unknown Object (MLST).
matmarex closed this task as Resolved.Dec 5 2014, 1:42 PM
matmarex removed a project: Patch-For-Review.

Change 177076 merged by jenkins-bot:
mediawiki.Uri: Implement support for a mutable defaultUri

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