Include the protocol in the ajax popup for shortened URLs and Special:UrlShortener
Open, Stalled, Needs TriagePublic


We should include the protocol in the ajax popup for shortened URLs and Special:UrlShortener.

Legoktm created this task.Jul 31 2016, 4:37 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 31 2016, 4:37 AM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptJul 31 2016, 4:38 AM

Hello @Legoktm could you please elaborate the description more. How can anyone reproduce the setting of the error, which extension is it about what, what do we need to clone etc?

Thanks for your interest! This is about the UrlShortener extension (see "Tags" on the right).
See for how to set up a development environment and how to clone a codebase.

Hello @Aklapper and @Legoktm , I tried to reproduce the setting and installed the UrlShortener extension via using the vagrant way, as explained on the extension page. However, I do not see any ajax popup during the shortening process. A clear explanation of how to encounter the issue would be helpful.

Aklapper changed the task status from Open to Stalled.Oct 7 2017, 8:15 PM

Setting task status to stalled until @Legoktm elaborates via Edit Task. Please reset the task status to open via Add Action...Change Status - thanks!

D3r1ck01 added a subscriber: D3r1ck01.EditedJan 28 2018, 9:01 AM

I've checked out this bug and I think @Legoktm means that when a URL is provided in the input field whose domain is not supported, the Ajax popup will show a message without the protocol available for this URL. For example;

  • Instead the message should be URLs to domain are not allowed to be shortened.

Looking at the extensions/UrlShortener/modules/ext.urlShortener.special.js on L55-L56, urlshortener-error-disallowed-url is being parsed and only host is fed into it. I presume both the host and the protocol attached to the host should be fed into mw.msg().

If at all this is what @Legoktm meant, then this should be easy to fix I think. @Legoktm, can you please confirm? Thanks

Change 418869 had a related patch set uploaded (by Rg4amia; owner: Rg4amia):
[mediawiki/extensions/UrlShortener@master] Show domain protocol in Ajax popup

D3r1ck01 assigned this task to Rg4amia.

I'm assigning to you as you submitted a patch that is pending review. Thanks so much and next time, when working on a task, assign it to yourself on phabricator. :)