Last modified: 2012-04-16 09:16:07 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 T37658, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35658 - Javascript error in ShortURL: mw.Uri balks on uris without protocol and host
Javascript error in ShortURL: mw.Uri balks on uris without protocol and host
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: High major (vote)
: 1.20.0 release
Assigned To: Lupo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-03 07:38 UTC by Niklas Laxström
Modified: 2012-04-16 09:16 UTC (History)
4 users (show)

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


Attachments

Description Niklas Laxström 2012-04-03 07:38:02 UTC
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
Comment 1 Sam Reed (reedy) 2012-04-03 13:53:03 UTC
It's not actually showing an error now...
Comment 2 Lupo 2012-04-03 14:05:59 UTC
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.
Comment 3 Niklas Laxström 2012-04-03 17:05:38 UTC
Here is another url where it fails: http://tieteentermipankki.fi/wiki/Hanke
Comment 4 Lupo 2012-04-05 20:25:05 UTC
Should be fixed in mw.Uri by https://gerrit.wikimedia.org/r/4365
Comment 5 Lupo 2012-04-09 21:27:37 UTC
Fixed in mw.Uri.

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


Navigation
Links