Last modified: 2014-11-17 10:36:31 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.
(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.
The easiest (existing) way would be:
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?
We could use ?curid.
?oldid good enough. Done in r45343
Re-opening. Original poster was looking for prettier links. /w/index.php?oldid= is not pretty.
(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:
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:
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/';
Since oldid isn't an action parameter, this'd still require special casing in the actual URL generation.
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?
http://xx.wikiwhatever.org/wiki/Special:Permalink/123456789 may also be the way. Probably the easiest ATM.
(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.
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.
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]]
(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:
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.
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.
*** Bug 21111 has been marked as a duplicate of this bug. ***
Brion's old notes about action paths here: <http://wikitech.wikimedia.org/view/Action_paths>.
I use something similar on my wiki
(In reply to comment #17)
> I use something similar on my wiki
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
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).
Just to note, there's now a Special page for permalinks: [[Special:PermanentLink/12345]].
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?
(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).