Page MenuHomePhabricator

Javascript error in ShortURL: mw.Uri balks on uris without protocol and host
Closed, ResolvedPublic


If you go to
you should see a javascript error:
mediawiki.Uri.js:140 Uncaught Error: Bad constructor arguments
Uri mediawiki.Uri.js:140
(anonymous function) ext.shortUrl.js:5 load.php:1046
jQuery.Callbacks.self.add load.php:1081
jQuery.fn.jQuery.ready load.php:279
jQuery.fn.jQuery.init load.php:198
jQuery load.php:27
(anonymous function) ext.shortUrl.js:1

Version: unspecified
Severity: major



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:18 AM
bzimport set Reference to bz35658.

It's not actually showing an error now...

Yes it is (in the Firebug console).

mw.Uri balks on Uris containing neither protocol nor host. In this case, it fails on

new mw.Uri("/!1qy")

Could be fixed by making the mw.Uri() constructor supply if no host is given, but document.location exists. Similar to what is done for the defaultProtocol already.