Page MenuHomePhabricator

{{localurl: Fails when used with the escaped {{pagename}} version ({{PAGENAMEE}}) on the main namespace.
Closed, ResolvedPublic

Description

{{localurl: Fails when used with the Escaped page name version (and the page has
spaces in its name) on the main namespace.

It seems a bit race condition.

If you use {{PAGENAME}}, it works, but fails with {{PAGENAMEE}}. Works ok if you
provide the name as text.

This affects to {{FULLPAGENAME}} and {{FULLPAGENAME}} too.

You can see the tests at
http://es.wikipedia.org/wiki/Usuario:Platonides/bugs/localurl_escaped_spaces.

You'll need to preview it from a spaced-page on the main namespace.


Version: 1.7.x
Severity: normal
URL: http://es.wikipedia.org/wiki/Usuario:Platonides/bugs/localurl_escaped_spaces

Details

Reference
bz6001

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:15 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz6001.
bzimport added a subscriber: Unknown Object (MLST).

It seems to work on plain ascii titles, but fail on some others. In [[wik i]]
works, but not on [[wik í]].

When i said that "affects to {{FULLPAGENAME}} and {{FULLPAGENAME}}"
meant that {{FULLPAGENAME}} works ok while {{FULLPAGENAMEE}} fails.

robchur wrote:

Ought to be fixed in SVN trunk, r14270.

gangleri wrote:

Halló Platonides and Rob!

I wonder if this a valid change. Some time ago I was confused again where and
how the ...PAGEE magic words should be used in {{localurl:}} / {{fullurl:}}.

At that time I opened
Bug 1649: PAGENAMEE works only with 7bit characters in
<nowiki>{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}}}</nowiki>
and it took a while to understand Brions comments.

{{localurl:}} / {{fullurl:}} expacts an title input between ":" and "|". This is
only the case if ...PAGE style magical words are used and *not always* when
using ...PAGEE type ones.

Depending on what special characters the ...PAGEE type magical words get,
{{...PAGEE:foo}} can be used in parameters as from={{...PAGEE:foo}}.

However it is hard to test all the combinations for the last usage.

Hope to get some time to see what has changed.

Best regards reinhardt [[user:gangleri]]

P.S. I hade not found so far any examples about different behaviour / output of
{{localurl:}} / {{fullurl:}} versus {{localurle:}} / {{fullurle:}}

Maybe Brion should explain why not fix. But shouldn't remain with these bugs.
They unexpectly break. I found it just by chance when working with an interface
message. I was doing probes with a non-ASCII7-titled page. Otherwise it'd go on
breaking for poor newbies.

gangleri wrote:

For my understanding there are some simple rules:

whatever generates a link inside [[ and ]] can be used unchanged between ":" and
"|" (and if no "|" is presen between ":" and "}}") in the magic words
{{localurl:}} / {{fullurl:}};
This means that you can use spaces, one "#" to delimit the anchor, *one*
starting colon. I did not try
[[ __ _ : __ foo _ __ #bar]] versus
{{fullurl: __ _ : __ foo _ __ #bar}}

The ...EE magic words (to which belongs {{TALKSPACEE}}) are generating portions
of the final url which can be generated with [[ ]] [ ] or protocoll://foo notation.

Whatever is include between "|" and "}}" is up to the user. The user has also
the responability about whatever he appendes after "}}".

There are many details about specific cases, sometimes the rendering is context
dependend and based on some assumptions (mentioned in bug 4581 comment 1).
In a clear context as inside [ ] the last character is the character before the
first space. In MediaZilla whatever is added inside the url fiels is part of the
url. This is why you can insert there both spaces and trailing cahracters as
".", ":" etc.