Jump to content

Extension talk:UrlShortener

About this board

Special:QrCode doesn't exist

2
Aafi (DCW) (talkcontribs)

I have the extension installed on dcwwiki.org and Download QR code button in the left sidebar works nicely. However, when I try to find Special:QrCode, it results in "You have requested an invalid special page." I have enabled $wgUrlShortenerEnableQrCode as true. Any suggestions what is potentially leading to this?

Ammarpad (talkcontribs)

The UrlShortener version you're using (MW 1.41 release) does not have the special page, because it was not added at the time. When it was added, MediaWiki was already at 1.42. You should upgrade the extension.

Reply to "Special:QrCode doesn't exist"
Proeksad (talkcontribs)
Ladsgroup (talkcontribs)

While I understand, the short urls have potential to become abuse vectors, e.g. to be used to disclose someone's identity. That's why it's not allowed to create a short url while blocked. The focus should be to reduce unfair block of IPs tbh.

Proeksad (talkcontribs)

I’m not sure that this helps in any way specifically for Wikimedia sites, where statistics and data on those who used the link are not provided for users.


I’m not sure that the fight against unfair blocking will lead to anything serious: this problem may not be solved for years, IPs are now being resold very actively. Moreover, since IP masking is planned, the blocking will only get stronger, in my opinion. A separate problem, as far as I understand, is that many people use proxies regularly.

Legoktm (talkcontribs)

In the abstract, preventing blocked users from performing on-wiki actions is a reasonable anti-abuse measure. I don't think you'd disagree with that?

Anyways, agreed with Ladsgroup here. The problem is that "blocked users" includes a number of people who (presumably) have done nothing wrong and are just being blocked for their IP address, VPN, etc. That is the central issue that needs to be solved and trying to address it feature-by-feature is going to be a mess and endless rehashing of the same discussion. Adding workarounds just reduces the incentive and pressure to solve it properly.

Proeksad (talkcontribs)

The key difference is that it is a tool for readers.

Readers are generally not restricted no matter what IP they have or whether they use a VPN. Besides, they won't even understand what it is

Reply to "“Bad” IP"

I've got one short URL that refuses to redirect properly

2
Summary by Jonathan3

My own fault. The extension works perfectly.

Jonathan3 (talkcontribs)

It redirects to my home page (<code>example.com/</code>) instead of the specific wiki page. The full URL of that wiki page is stored correctly in the database, just like the others before and after it. It doesn't go to the "Sorry, the URL you are looking for has not been found." error page.

The only thing that's notable is that it's ID is 100, but I can't imagine that being the cause.

I'll keep thinking about it, but if you have any ideas that would be great.

Jonathan3 (talkcontribs)

It was my own fault. I'd messed up an .htaccess redirect ages ago and hadn't noticed.

I had to change

#Same for short.uk/a as it doesn't get set automatically by the extension
RewriteRule a http://www.long.co.uk/ [R=301,L]

to

RewriteRule ^a$ http://www.long.co.uk/ [R=301,L]

My site uses https but UrlShortener is saving http URLs to usc_url

3
Jonathan3 (talkcontribs)

How can I change this? Thanks.

Legoktm (talkcontribs)

This is on purpose, it saves one character in the database. UrlShortener should be transforming it back to HTTPS on output, is that not the case?

Jonathan3 (talkcontribs)

Yes that seems to work fine! (I only noticed the http when checking a short URL that refuses to redirect properly for some reason.)

Not a UrlShortener question as such, but is there something I am missing in LocalSettings.php that would obviate the need for the second 301 below?

Status code	Scheme	URL
301	https	https://www.short.uk/xyz
301	http	http://www.long.co.uk/index.php?title=Special:UrlRedirector/xyz
301	https	https://www.long.co.uk/index.php?title=Special:UrlRedirector/xyz
200	https	https://www.long.co.uk/Pagename
Reply to "My site uses https but UrlShortener is saving http URLs to usc_url"

Now redirects to Special:UrlShortener

2
Summary by Jonathan3

Was using old branch.

Jonathan3 (talkcontribs)

Is this a new thing? I upgraded from MW 1.34 to 1.35.8 today, and did a "git pull" on this extension. That broke the site but "git checkout REL1_35" fixed it.

The URL shortener used to work as part of the dropdown menu in the Foreground skin. Now when you click "get shortened URL" it redirects to the special page first and you have to click another button.

Is there any way of getting back to the old way of doing things? Thanks.

Jonathan3 (talkcontribs)

Sorry for such a quick rubber duck solution. But "git checkout REL1_36" makes the nice behaviour return!

Request new feature for extension

1
Beginneruser (talkcontribs)

Hello, everyone

If user set custom URL in short domain it looks like UrlShortener requires new parameters

First request feature (Set Start Short URL)

For example if user set 5 integer number length or 3 integer number length short URL for long URL, default setting extension begin 1 integer number length and 2 to 3 and etc

Second request feature (Set Short URL manually)

But user want short URL begin from custom address.

But also user if want set short URL manually (not random) UrlShortener extension not supported yet.

For example:

Start and first Short URL: w.wiki/50000

Second Short URL: w.wiki/50001

Third Short URL: w.wiki/50002

.

.

.

End Short URL: w.wiki/99999

or

Start and first Short URL: w.wiki/aaaaa

Second Short URL: w.wiki/aaaab

Third Short URL: w.wiki/aaaac

.

.

.

End Short URL: w.wiki/zzzzz

Third request feature (Set Forbidden URL characters)

But add setting parameters for forbidden URL characters address by regex rule.

Reply to "Request new feature for extension"

API doesn't seem to test for the URL's domain....

2
BertrandGorge (talkcontribs)

I've set up a script that makes use of the API to shorten URLs right from a spreadsheet, and I was surprised to find that the $wgUrlShortenerAllowedDomains is not tested then. I could shorten just about anything as long as it was a valid URL.

BertrandGorge (talkcontribs)
Reply to "API doesn't seem to test for the URL's domain...."
41.254.66.119 (talkcontribs)

This is what appears:

[c99ad0719e66fffd1396db68] Caught exception of type Wikimedia\Rdbms\DBQueryError

Legoktm (talkcontribs)

Please see How to debug for obtaining the full error message, what you provided really isn't enough to go on.

Reply to "Error"
DannyS712 (talkcontribs)

download link broken

2
Nicole Sharp (talkcontribs)

I get the following error when trying to download this extension:

No such extension "UrlShortener".

Unable to fetch extension list!

Nicole Sharp (talk) 17:51, 6 June 2019 (UTC)

Quiddity (WMF) (talkcontribs)

It seems to work now. (Using the default version selected). Perhaps it was just a temporary problem?

Reply to "download link broken"