Page MenuHomePhabricator

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

Description

If you go to http://tieteentermipankki.fi/wiki/K%C3%A4ytt%C3%A4j%C3%A4:Antti_Kanner?debug=true
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
jQuery.Callbacks.fire 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

Details

Reference
bz35658

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 document.location.host if no host is given, but document.location exists. Similar to what is done for the defaultProtocol already.