Last modified: 2014-11-17 10:36:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 16659 - Prettify permalinks
Prettify permalinks
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement with 7 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 21111 (view as bug list)
Depends on: 21647 23489
Blocks: 21572
  Show dependency treegraph
 
Reported: 2008-12-16 01:35 UTC by Brion Vibber
Modified: 2014-11-17 10:36 UTC (History)
20 users (show)

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


Attachments

Description Brion Vibber 2008-12-16 01:35:04 UTC
Our current permalinks are kinda ugly...

Particularly for non-ASCII bits the title portion of a link can be hugely ugly (all URL encoded) and hard to type in by hand, making a clean ID-based permalink easier to use from print.

eg from:
http://en.wikipedia.org/w/index.php?title=Main_Page&oldid=251850832
->
http://en.wikipedia.org/revision/251850832

or:
http://hi.wikipedia.org/w/index.php?title=%E0%A4%B8%E0%A5%82%E0%A4%B0%E0%A5%8D%E0%A4%AF%E0%A4%B5%E0%A4%82%E0%A4%B6%E0%A5%80_(1992_%E0%A4%AB%E0%A4%BC%E0%A4%BF%E0%A4%B2%E0%A5%8D%E0%A4%AE)&oldid=188492
->
http://hi.wikipedia.org/revision/188492

(A $wgActionPaths entry or similar can provide the exact path, as long as we've got some shorter way to do this standard.)

cf bug 16428 asking to put permalinks in the print version footer.
Comment 1 Melancholie 2008-12-16 02:10:29 UTC
The easiest (existing) way would be:
* http://en.wikipedia.org/wiki/Main_Page?oldid=251850832
or even
* http://en.wikipedia.org/?oldid=251850832
Comment 2 Niklas Laxström 2008-12-16 11:45:01 UTC
FYI: IRC feeds already make links as domain.tld/scriptpath/index.php?oldid=####. Is there any reason why the title could not be dropped in this case too?
Comment 3 Aaron Schulz 2009-01-02 20:43:18 UTC
We could use ?curid.
Comment 4 Aaron Schulz 2009-01-02 20:50:43 UTC
?oldid good enough. Done in r45343
Comment 5 MZMcBride 2009-01-08 07:53:19 UTC
Re-opening. Original poster was looking for prettier links. /w/index.php?oldid= is not pretty.
Comment 6 Gurch 2009-01-08 14:54:45 UTC
(In reply to comment #5)
> Re-opening. Original poster was looking for prettier links. /w/index.php?oldid=
> is not pretty.

Agree that http://en.wikipedia.org/w/index.php?oldid=123456789 is not sufficiently pretty.

The following two also work, though:

http://en.wikipedia.org/?oldid=123456789
http://en.wikipedia.org/wiki/?oldid=123456789
Comment 7 Brion Vibber 2009-01-08 18:31:01 UTC
They're pretti*er* and I think the best we can do as a default, but not as pretty as I'd like. :)

Note that something like:

  http://en.wikipedia.org/?oldid=123456789

can be achieved with the current code by setting $wgScript to a shorter value.

I think I'm more interested in $wgActionPaths support, allowing for customized rewriting for the site's local setup.

Say, something like:

  $wgActionPaths['oldid'] = '/revision/';

leading to:

  http://en.wikipedia.org/revision/123456789

Since oldid isn't an action parameter, this'd still require special casing in the actual URL generation.
Comment 8 MeekSaffron 2009-01-15 00:08:04 UTC
There is a downside to making permalinks shorter though. Now you can't tell the page title by looking at it. Excepting the long-ASCII example, I don't think this is more useful. I use permalinks to reference or read articles in the state I found them, and now I have to copy the article name separately.

I would prefer for this bug to be reversed, as it reduces the usefulness of the permalink. 

If it's primarily about the long-ASCII example, could the permalink include the title unless there were 10+ ASCII conversions?
Comment 9 Danny B. 2009-01-15 00:53:34 UTC
http://xx.wikiwhatever.org/wiki/Special:Permalink/123456789 may also be the way. Probably the easiest ATM.
Comment 10 Alex Z. 2009-01-15 14:37:56 UTC
(In reply to comment #2)
> FYI: IRC feeds already make links as
> domain.tld/scriptpath/index.php?oldid=####. Is there any reason why the title
> could not be dropped in this case too?
> 

Note that the IRC feed wasn't really changed for "prettyness" but because the title was already included elsewhere in the IRC messages, it was removed to save space by reducing duplication.
Comment 11 Brion Vibber 2009-01-16 21:06:40 UTC
It perhaps makes sense here to distinguish between the permalink on the "Permalink" on the sidebar, and the link that's listed in printable view.

The printable view gets particular benefit from having a short link which can be typed by hand; a clickable permalink may be used online and not have as much of a requirement.
Comment 12 Gurch 2009-01-23 18:28:35 UTC
Juat a note that a few people seem to be dissatisfied with the removal of the page title from 'permanent link' URLs: [[Wikipedia:Village pump (technical)#Permanent links and page titles]]
Comment 13 Pixelface 2009-01-24 18:04:32 UTC
(In reply to comment #12)
> Juat a note that a few people seem to be dissatisfied with the removal of the
> page title from 'permanent link' URLs: [[Wikipedia:Village pump
> (technical)#Permanent links and page titles]]

That was me Gurch. I've created an account here.

I would like the "Permanent link" hyperlink in the left sidebar toolbox to show the title field like it previously did before r45343 to SkinTemplate.php.

(In reply to comment #8)
> Excepting the long-ASCII example, I don't think this is more useful.

I agree with what MeekSaffron said.

And regarding bug 16428, oldids still aren't visible when printable=yes. So perhaps if or when oldids do become visible in the print version footer, then the devs can prettify the printfooter permalinks.

These both look nice:
http://en.wikipedia.org/?oldid=260905624
http://en.wikipedia.org/revision/260905624

If you don't want to undo r45343, perhaps an additional line could be added to the toolbox so it displays:
Short permament link ---> http://en.wikipedia.org/w/index.php?oldid=260905624
Titled permanent link ---> http://en.wikipedia.org/w/index.php?title=Main_Page&oldid=260905624

If the software treats all permalinks the same, could it be modified to distinguish between untitled and titled permalinks (or toolbox permalinks and printfooter permalinks)? I apologize if I've crossed bugs at all, or if my suggestions merit a new bug report.
Comment 14 Brion Vibber 2009-01-26 21:56:34 UTC
This hasn't been very popular so far, and is still incomplete. Pulling back for now in r46290 on trunk, r46291 on 1.14 branch.
Comment 15 Brion Vibber 2009-10-14 18:27:26 UTC
*** Bug 21111 has been marked as a duplicate of this bug. ***
Comment 16 MZMcBride 2011-08-17 19:54:37 UTC
Brion's old notes about action paths here: <http://wikitech.wikimedia.org/view/Action_paths>.
Comment 18 Krinkle 2012-02-07 16:04:00 UTC
(In reply to comment #17)
> I use something similar on my wiki 
> http://www.wecowi.de/wiki/Hauptseite

Those are not permalinks but "action paths", the "Permanenter Link" on your wiki goes to http://www.wecowi.de/index.php?title=Hauptseite&oldid=114938 as well
Comment 19 Krinkle 2012-02-07 16:06:18 UTC
Adding dependency on bug 23489. Otherwise the page resulting from a permalink to a hidden/deleted revision will be crippled (since title would default to useless "Main Page" and has no way of getting to the title).
Comment 20 MZMcBride 2013-05-14 14:54:27 UTC
Just to note, there's now a Special page for permalinks: [[Special:PermanentLink/12345]].
Comment 21 TeleComNasSprVen 2014-08-27 08:22:48 UTC
Okay, why can't we have Apache internally rewrite https://hi.wikipedia.org/revision/188492 into https://hi.wikipedia.org/w/index.php?oldid=188492 and have MediaWiki interpret it as a GET request for an oldid parameter?
Comment 22 Daniel Friesen 2014-08-27 08:44:18 UTC
(In reply to TeleComNasSprVen from comment #21)
> Okay, why can't we have Apache internally rewrite
> https://hi.wikipedia.org/revision/188492 into
> https://hi.wikipedia.org/w/index.php?oldid=188492 and have MediaWiki
> interpret it as a GET request for an oldid parameter?

First note, don't use Apache rewrites for this, MediaWiki's path router can be made to handle urls like that internally.

And the answer to your question seems to be this earlier note:
(In reply to Krinkle from comment #19)
> Adding dependency on bug 23489. Otherwise the page resulting from a
> permalink to a hidden/deleted revision will be crippled (since title would
> default to useless "Main Page" and has no way of getting to the title).

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


Navigation
Links