Last modified: 2014-11-17 10:36:17 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 T23572, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21572 - [Short URLs] Safe permanent link to a page (e.g. using one of its history id)
[Short URLs] Safe permanent link to a page (e.g. using one of its history id)
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on: 16659 42238 16362 23427 38561
Blocks: 42085
  Show dependency treegraph
 
Reported: 2009-11-19 21:16 UTC by lɛʁi לערי ריינהארט
Modified: 2014-11-17 10:36 UTC (History)
13 users (show)

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


Attachments

Description lɛʁi לערי ריינהארט 2009-11-19 21:16:57 UTC
note: This feature request might be a duplicate. I spend an half an hour searching an old request fromm an contributor in a Wikipedia using non Basic Latin UTF-8 characters.


Dear friends;

Last week I saw a link to a page from the Wikipedia in Hebrew on facebook. It was a public computer using Internet Explorer on a Windows in the State Library of Bavaria in Mubich. I was neither able to click on the link nor to copy the link from facebook and paste it to the url line in IE because to improper UTF-8 handling of involved programs and operating system.

As you know there are a lot of redirecting special pages as [[Special:MyPage]], [[Special:MyTalk]] and some spelling variants for many other special pages.

Today http://en.wikipedia.org/w/index.php?title=User_talk:Gangleri/tests/sandbox/squares&oldid=307411828 is a permanent link to [[user_talk:Gangleri/tests/sandbox/squares]] a shorter version is http://en.wikipedia.org/w/index.php?oldid=307411828 as implemented in [[wikt:yi:MediaWiki:Gadget-ShortLink]]
see also
http://en.wikipedia.org/w/index.php?title=Wikipedia:WikiProject_User_scripts/Requests&oldid=190868168#toolbox_item_or_tab_with_a_short_format_link_using_.C2.AB_oldid.3D.7B.7BREVISIONID.7D.7D_.C2.BB

One solution to lates versions could be the implementation of "newest" as in a constructed link
http://en.wikipedia.org/w/index.php?diff=307411828&newest
(I have no clue what this link generates today).

Because I experienced lots of problems posting links at facebook containing ampersands I would suggest to implement a save redirecting special page [[Special:Newest/190868168]].

Best regards Reinhardt [[user:Gangleri]]
Comment 1 Platonides 2009-11-19 21:22:57 UTC
I think you would want to use http://en.wikipedia.org/w/index.php?curid=23897925 instead.
Comment 2 lɛʁi לערי ריינהארט 2009-11-19 21:39:54 UTC
(In reply to comment #0)
> ... implement a save redirecting special page ...
should read
... implement a *safe* redirecting special page ...

----

Thanks Platonides;

your link worked a few seconds ago; after a minor edit it generates a bad title.

http://en.wikipedia.org/w/index.php?oldid=306683475 is valid
but
http://en.wikipedia.org/w/index.php?curid=306683475 is *not*.

note: due to caching you may still see an outdated result. PLease reload your cache or try again tomorrow.
Comment 3 Platonides 2009-11-19 21:45:05 UTC
But http://en.wikipedia.org/w/index.php?curid=23897925 *is*
oldid is a revision number. curid is a page number. Don't mix both numbers.
curid will refer to the same page regardless of its name (should follow even accross renames)
oldid refers to the a page content (ie. a revision).

Comment 4 lɛʁi לערי ריינהארט 2009-11-20 12:51:52 UTC
(In reply to comment #3)
> But http://en.wikipedia.org/w/index.php?curid=23897925 *is*
> oldid is a revision number. curid is a page number. Don't mix both numbers.

Thanks I understand. But I have no clue where to look for a page number. It might be that newbies can not handle this.

The feature request is mainly about simplest (safe) links as:

http://lccn.loc.gov/87119832
http://opc4.kb.nl/DB=1/PPN?PPN=173853307
http://d-nb.info/991503929
http://d-nb.info/740050788 
etc.
Comment 5 Platonides 2009-11-20 21:57:32 UTC
It lists wgArticleId=23897925 at the page source on the header.
It is a little known feature, the articles are not expected to be reached by id, the only official way to reach an article is the page title, curid links are only a workaround, and are not guaranteed to be properly cached (Bug 20818)
Comment 6 lɛʁi לערי ריינהארט 2009-11-21 20:41:51 UTC
Thanks Platonides for the detailed comments.

I looked at
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/SpecialPage.php?view=markup
and could see

    var $mAllowedRedirectParams = array();
    /**
     * List of special pages, followed by parameters.
     * If the only parameter is a string, that is the page name.
     * Otherwise, it is an array. The format is one of:
     ** array( 'SpecialPage', name, right )
     ** array( 'IncludableSpecialPage', name, right, listed? )
     ** array( 'UnlistedSpecialPage', name, right )
     ** array( 'SpecialRedirectToSpecial', name, page to redirect to, special page param, ... )
     */
...
class SpecialMypage extends UnlistedSpecialPage { ...
...
class SpecialMytalk extends UnlistedSpecialPage { ...

Do you think it would take many lines of code to implement a similar functionality for [[Special:Newest/190868168]] ?

Because neither  [[Special:MyPage]] nor [[Special:MyTalk]] require an explicit code page at http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/specials/ .
Comment 7 lɛʁi לערי ריינהארט 2009-11-21 22:57:42 UTC
additional note:
special:Mypage preserves anchors; see **commons:special:Mypage#bugzilla_012225** redirecting for me correctly to [[commons:לערי_ריינהארט#bugzilla_012225]]
special:Newest (or whatever should be the name of the redirecting page) should do the same
see
1) http://commons.wikimedia.org/w/index.php?oldid=32174572#media_examples **oldid**
2) http://commons.wikimedia.org/w/index.php?curid=8329171#media_examples  **curid**
3) [[commons:special:Newest/190868168#media_examples]]
Comment 8 lɛʁi לערי ריינהארט 2009-11-21 22:58:38 UTC
(In reply to comment #7)
> [[commons:לערי_ריינהארט#bugzilla_012225]]

should read [[commons:user:לערי_ריינהארט#bugzilla_012225]]

Comment 9 Platonides 2009-11-21 23:25:59 UTC
> Do you think it would take many lines of code to implement a similar
> functionality for [[Special:Newest/190868168]] ?

No. It would be easy to code. But i don't think it's the path to go.
If its only reason is for "safe links", curid already does that. Manually 
creating links to Special:Newest wouldn't be easier than creating curid links.
Comment 10 lɛʁi לערי ריינהארט 2009-11-21 23:47:20 UTC
(In reply to comment #9)
...
> No. It would be easy to code. But i don't think it's the path to go.
> If its only reason is for "safe links", curid already does that. Manually 
> creating links to Special:Newest wouldn't be easier than creating curid links.


I made the request because of page moves. As you can see at
http://commons.wikimedia.org/w/index.php?title=Commons:Story_%28game%29_-_collaborative_work&action=history
curid might not preseve.

The feature request relates to have a safe link to the most actual content (regardless if the page was moved or not).
Comment 11 Roan Kattouw 2009-11-22 10:08:49 UTC
(In reply to comment #10)
> (In reply to comment #9)
> ...
> > No. It would be easy to code. But i don't think it's the path to go.
> > If its only reason is for "safe links", curid already does that. Manually 
> > creating links to Special:Newest wouldn't be easier than creating curid links.
> 
> 
> I made the request because of page moves. As you can see at
> http://commons.wikimedia.org/w/index.php?title=Commons:Story_%28game%29_-_collaborative_work&action=history
> curid might not preseve.
> 
> The feature request relates to have a safe link to the most actual content
> (regardless if the page was moved or not).
> 

I don't understand. If you want a "safe link to the most actual content regardless of moves", why don't you just use the title, like http://en.wikipedia.org/wiki/Foo ? The point of curid links is to be able to link to a page even after a move, so that if [[Foo]] was moved to [[Bar]] later, a URL like http://en.wikipedia.org/w/index.php?curid=123 would point to the new name.

Could you be clearer as to which of these two behaviors you want, and why the existing features in the software aren't good enough?
Comment 12 lɛʁi לערי ריינהארט 2009-11-23 00:52:16 UTC
(In reply to comment #11)
> Could you be clearer as to which of these two behaviors you want, and why the
> existing features in the software aren't good enough?

Thanks for the comment Roan! I should have read comment #3 more carefuly:
...
> curid will refer to the same page regardless of its name (should follow even
> accross renames)
> oldid refers to the a page content (ie. a revision).

I understand now that curid provides the right functionality. We should also agree that fetching the curid is tricky:
a) one needs to look at the source code of the page
b) there is no magic word "CURID" available at [[special:Version]] today

I think / dream about a feature (mainly) available at wikis using non Latin scripts where an additional item can be used in the toolbox the same way as
permalink'         => 'Permanent link'
from http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesEn.php?view=markup is used in the toolbox.

I assume that today there is no way to construct an equivalent to [[special:Curid/{{CURID}}]] (a better notation then [[Special:Newest/190868168]]) and offer the links automaticaly to all users / vizitors.
Comment 13 lɛʁi לערי ריינהארט 2009-11-23 01:03:39 UTC
P.S. [[Permanent_link]] lists / suggests / lets us think about
links without the characters %, ?, = and dimilar characters.
Comment 14 Platonides 2009-11-23 17:35:55 UTC
(In reply to comment #12)
> I think / dream about a feature (mainly) available at wikis using non Latin
> scripts where an additional item can be used in the toolbox the same way as
> permalink'         => 'Permanent link'
> from
> http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesEn.php?view=markup
> is used in the toolbox.

That can be done immediatly using javascript.
Also quite easy to add as code. How would you call that link?
Comment 15 lɛʁi לערי ריינהארט 2009-11-23 22:52:04 UTC
(In reply to comment #14)
....
> That can be done immediatly using javascript.
> Also quite easy to add as code. How would you call that link?

Let's say "Short url". Please implement the code at http://test.wikipedia.org/ .
Thanks in advance!
Comment 16 lɛʁi לערי ריינהארט 2009-11-23 22:58:11 UTC
Please see http://test.wikipedia.org/w/index.php?title=special:ListUsers&limit=1&username=Platonides

I assume the feature request can be changed to another wording:

« safe referencing a page by its curid »

or whatsoever
Comment 17 Platonides 2009-11-23 23:33:08 UTC
Thanks. It has been implemented.
Bypass your cache and look at the bottom of the toolbox.
Comment 18 lɛʁi לערי ריינהארט 2009-11-24 00:43:35 UTC
Thanks a lot Platonides!

it works at the Yiddish wikis via MediaEiki:Common.js
http://yi.wiktionary.org/w/index.php?curid=3817
http://yi.wikipedia.org/w/index.php?curid=21880
http://yi.wikisource.org/w/index.php?curid=1825

and at my personal monobook.js pages:
http://commons.wikimedia.org/w/index.php?curid=120655
http://en.wikipedia.org/w/index.php?curid=1785858

I remember this feature was requested some years ago in relation to wikis using cyrillic script. Please post the solution at an appropriate place. Thanks in advance!
Comment 19 lɛʁi לערי ריינהארט 2009-11-24 00:53:12 UTC
FYI: The coded added at http://www.wikieducator.org/index.php?curid=75842 my monobook.js page adds the "short link" to "My Collection" not to "Toolbox". If you log in you may see this also at my page http://www.wikieducator.org/index.php?curid=75775 .
Comment 20 lɛʁi לערי ריינהארט 2009-11-24 13:43:12 UTC
Some comments about the Java script.

a) "Short url" is not available for anonymous users at Yiddish wikis despite the fact that the code is available in MediaEiki:Common.js (see comment #18).

b) "Short url" does not preserve parameters;

b1) such parameters might be interesting in relation with special pages as
http://translatewiki.net/w/i.php?title=Special:ListUsers&limit=1&username=Gangleri
btw: "Short url" is  not available there
b) such parameters might be required at special wikis:

http://www.omegawiki.org/index.php?title=DefinedMeaning:historia_(154518)&dataset=uw
http://www.omegawiki.org/index.php?curid=510200

http://www.omegawiki.org/index.php?title=DefinedMeaning:game_(6411)&dataset=uw
http://www.omegawiki.org/index.php?curid=507983

http://www.omegawiki.org/index.php?title=DefinedMeaning:interdisziplinär_(675679)&dataset=uw
http://www.omegawiki.org/index.php?curid=655312

http://www.omegawiki.org/index.php?title=DefinedMeaning:co-operation_(758)&dataset=uw
http://www.omegawiki.org/index.php?curid=502330

references (my monobook.js pages ) :
http://translatewiki.net/w/i.php?curid=10203
http://www.omegawiki.org/index.php?curid=350187
Comment 21 Platonides 2009-11-24 21:57:48 UTC
> I remember this feature was requested some years ago in relation to wikis using
> cyrillic script. Please post the solution at an appropriate place. Thanks in
> advance!

You probably know better than me the places where it is needed, I am not on wikis outside iso-8859-1 :)


(In reply to comment #19)
> FYI: The coded added at http://www.wikieducator.org/index.php?curid=75842 my
> monobook.js page adds the "short link" to "My Collection" not to "Toolbox". If
> you log in you may see this also at my page
> http://www.wikieducator.org/index.php?curid=75775 .

On that wiki, the toolbox has two "sections": "My Collection" and "Toolbox".
The p-collection div shouldn't be a child of the p-tb one. Isn't there a newer version 
of Collection extension?


> a) "Short url" is not available for anonymous users at Yiddish wikis despite
> the fact that the code is available in MediaEiki:Common.js (see comment #18).

It works. Force your cache to reload. (You probably also want to rename it)


> b) "Short url" does not preserve parameters;

Where it makes no sense, it is designed so the link won't appear, that includes
special pages, articles yet to be written...
Special pages are magic, they aren't pages, so they don't have an article id.
If you want to safely link to special pages, you should use its canonical name 
(the English one).

Wikis using special namespaces are probably better using customized version. 
Try http://www.omegawiki.org/User:Platonides/monobook.js
(I hadn't logged there for three years, since the time it was WiktionaryZ...)
Comment 22 lɛʁi לערי ריינהארט 2009-11-26 14:28:22 UTC
(In reply to comment #21)
...

> > b) "Short url" does not preserve parameters;
...
> Wikis using special namespaces are probably better using customized version. 
> Try http://www.omegawiki.org/User:Platonides/monobook.js
> (I hadn't logged there for three years, since the time it was WiktionaryZ...)

http://www.omegawiki.org/User:Platonides/monobook.js is great! Thanks a lot!
Comment 23 lɛʁi לערי ריינהארט 2010-07-22 00:10:52 UTC
I reopen this request. The workaround with the Javascript was usefull a long time but due to some unknown reasons (maybe changes in MediaWiki and site setups) the Javascript is not working any more.

http://it.wikipedia.org/w/index.php?curid=3044130 describes a report at Italian Wikipedia.

Please reconsider to implement short referencing links as a standard functionality. I found many Wikipedia links in the past which redirects. A short referencing link would relate to the actual content of a topic and not to a title or to a certain revision only.

http://ro.wikipedia.org/w/index.php?title=Wikipedia:Cafenea&oldid=4336323#Probleme_legate_de_caracterele_specifice_limbii_rom.C3.A2ne is about an issue with homeoglyphs at Romanian Wikipedia. I do not know how many pages would need to be redirected there.

Best regards Reinhardt

P.S. You may investigate which are the reasons why the original Javascript is not functional today at Italian Wikipedia. Thanks in advance!
Comment 24 Nemo 2012-08-26 21:08:42 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > But http://en.wikipedia.org/w/index.php?curid=23897925 *is*
> > oldid is a revision number. curid is a page number. Don't mix both numbers.
> 
> Thanks I understand. But I have no clue where to look for a page number. It
> might be that newbies can not handle this.

I've replaced the summary with what's your actual aim and I think that bug 38561 would fix it.
Comment 25 Nemo 2012-11-18 10:40:46 UTC
(In reply to comment #9)
> > Do you think it would take many lines of code to implement a similar
> > functionality for [[Special:Newest/190868168]] ?
> 
> No. It would be easy to code. But i don't think it's the path to go.
> If its only reason is for "safe links", curid already does that. Manually 
> creating links to Special:Newest wouldn't be easier than creating curid links.

Platonides, how safe is curid? 

(Krinkle on bug 42085 comment 14)
> (In reply to comment #13)
> > Some short urls, which works:
> > 
> > https://en.wikipedia.org?curid=15580374
> > https://en.wikipedia.org?diff=521573414
> > 
> 
> These have been discussed in the past and should never be used as a short url.
> Diff is a difference view, hardly useful. I assume that should be "oldid"
> instead:
> https://en.wikipedia.org?oldid=521573414
> 
> Which is a permanent link to a certain revision, however revisions can be
> removed, hidden or merged. And one probably wants to link to the latest version
> of an article.
> '"curid" isn't very useful either because that links to the pageid, and
> articles can be renamed, deleted, re-created, merged, and split. What we want
> is link to a title, this is what the shorturl extension does. It creates a
> short unique ID for titles.

...which is wrong at least for renames because Roan said:

(In comment #11)
> The point of curid links is to be able to
> link to a page even after a move, so that if [[Foo]] was moved to [[Bar]]
> later, a URL like http://en.wikipedia.org/w/index.php?curid=123 would point to
> the new name.
Comment 26 Krinkle 2012-11-18 13:36:28 UTC
(In reply to comment #25)
> (In reply to comment #9)
> > > Do you think it would take many lines of code to implement a similar
> > > functionality for [[Special:Newest/190868168]] ?
> > 
> > No. It would be easy to code. But i don't think it's the path to go.
> > If its only reason is for "safe links", curid already does that. Manually 
> > creating links to Special:Newest wouldn't be easier than creating curid links.
> 
> Platonides, how safe is curid? 
> 

curid used to  be a little unstable with pages that are deleted and then undeleted again, however it is pretty safe right now. However there is a fundamental difference between a permanent link to a page (for users) and a permanent link to an article on a certain subject (readers).

> (Krinkle on bug 42085 comment 14)
> > (In reply to comment #13)
> > > Some short urls, which works:
> > > 
> > > https://en.wikipedia.org?curid=15580374
> > > https://en.wikipedia.org?diff=521573414
> > > 
> > 
> > These have been discussed in the past and should never be used as a short url.
> > Diff is a difference view, hardly useful. I assume that should be "oldid"
> > instead:
> > https://en.wikipedia.org?oldid=521573414
> > 
> > Which is a permanent link to a certain revision, however revisions can be
> > removed, hidden or merged. And one probably wants to link to the latest version
> > of an article.
> > '"curid" isn't very useful either because that links to the pageid, and
> > articles can be renamed, deleted, re-created, merged, and split. What we want
> > is link to a title, this is what the shorturl extension does. It creates a
> > short unique ID for titles.
> 
> ...which is wrong at least for renames because Roan said:
> 
> (In comment #11)
> > The point of curid links is to be able to
> > link to a page even after a move, so that if [[Foo]] was moved to [[Bar]]
> > later, a URL like http://en.wikipedia.org/w/index.php?curid=123 would point to
> > the new name.


As said, the shorturl discussed on bug 42085 is of different nature, I've therefore undid that erroneous dependency. In an editing context, you want a permanent link to the page, with its history and revisions (e.g. for patrolling an edit, or linking to a history page and what not).

However if you want a permanent link for sharing to the article about Foo, then we use title ids[1] (not page ids), which is what the ShortUrl extension implements. See bug 42085 for more info on that.

[1] For the exact reason Roan says. Because when you link to Foo, then you don't want to be linking to "Foo (disambiguation)" when it has been renamed, or if it was nominated for deletion and re-created 2 years later, you're linking to the title (not page) which is independent from time and space.
Comment 27 Nemo 2012-11-18 15:51:14 UTC
(In reply to comment #26)
> However if you want a permanent link for sharing to the article about Foo, then
> we use title ids[1] (not page ids), which is what the ShortUrl extension
> implements. See bug 42085 for more info on that.

I've already read it and I disagree with what you say. This feature serves readers, which don't care e.g. if the article is moved to another title to respect lowercase/uppercase conventions, or to free it in order to create a disambiguation page, etc. If they want a permanent link, they just want to link the content they're seeing, which by definition will have to follow the history i.e. the page id. 

Permanent links to a title (which to be really permanent would need ?redirect=no) are surely another use case, which is useful mainly for editors – who care about exact titles, histories and archives to be dug, linking titles which currently have no content or a different content but in a far future will have what the title should have according to conventions, ... and such things –, but has some overlap with the previous point.

Bug 42085 has currently three possible implementations: this bug, ShortUrl and LilURL-like; they should all be added as blockers until one is chosen, but the others don't have bugs AFAIK.
Comment 28 This, that and the other (TTO) 2013-12-23 11:21:38 UTC
This bug has got quite confusing. Let me see if I can untangle it:

* People want a safe permanent URL that 
** Points to a specific wiki page (by page ID/curid), not a revision (oldid)
   à la Special:PermanentLink nor a page title à la [[mw:Extension:ShortUrl]]
** Contains no non-ASCII characters.
** Is relatively short.
** Is discoverable for those who need it (having it displayed on action=info
   might be enough).

In my view, index.php?curid=<page ID> has always worked for this, although it is not particularly short, some may dislike the query string syntax, and discoverability is poor (especially because the parameter is so badly named - bug 27087).

And now, per bug 58727, we can use Special:Redirect/page/<page ID>, which is nothing more than an alias for curid. It fits the bill a little better, although I guess if you want a really short URL, you could set up a rewrite on your server.

Please tell me if I got it wrong.

Nemo and gangleri, if you could clarify what you will want to see before this bug can be marked FIXED, it would be very helpful, so we can focus the progress here :)
Comment 29 Nemo 2013-12-23 17:43:23 UTC
TTO, the part about discoverability of curid (and now Special:Redirect I guess) is bug 42238, which probably is mainly a usability/design issue. I agree that curid is mostly enough, but people obviously didn't think so till now or we wouldn't have extensions doing that job.
Comment 30 This, that and the other (TTO) 2013-12-24 00:11:54 UTC
Thanks Nemo, but my question remains:

(In reply to comment #28)
> if you could clarify what you will want to see before this
> bug can be marked FIXED, it would be very helpful, so we can focus the
> progress here :)

This bug is quite vague, covering many mixed issues, and I feel that it needs a clear goal.
Comment 31 Nemo 2013-12-24 08:01:14 UTC
(In reply to comment #30)
> Thanks Nemo, but my question remains

Let me rephrase then: this bug will be fixed to the reporter's satisfaction when people will think the solution enough to supersede the shorturl extension.

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


Navigation
Links