Last modified: 2014-02-26 14:35:16 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 T60793, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58793 - [Regression] Previously valid fullurl with empty article name now broken
[Regression] Previously valid fullurl with empty article name now broken
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.23.0
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: code-update-regression
Depends on:
Blocks: 54044
  Show dependency treegraph
 
Reported: 2013-12-21 13:05 UTC by TMg
Modified: 2014-02-26 14:35 UTC (History)
4 users (show)

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


Attachments

Description TMg 2013-12-21 13:05:30 UTC
This short syntax:

{{fullurl:de:|diff=117674067}}
{{fullurl::|diff=117674067}}

did work without a problem. It created this perfectly valid URL:

//de.wikipedia.org/w/index.php?title=&diff=117674067

Users and scripts are relying on this syntax. It was used on several pages. They are all broken now. This makes this a regression. Please make it work again. Thanks. From what I see there shouldn't be a strong reason to block the syntax if the page name is empty. The currently broken output (it tries to find a template with that name) is far worse.
Comment 1 Bartosz Dziewoński 2013-12-21 17:28:48 UTC
This is probably caused by the fix for bug 54044 (I574168c9).
Comment 2 Greg Grossmeier 2013-12-23 17:47:20 UTC
Umherirrender: can you take a look into this?
Comment 3 Bartosz Dziewoński 2013-12-23 18:24:20 UTC
I'm really not sure if this is a valid use-case; fullurl: and other parser functions listed at https://www.mediawiki.org/wiki/Help:Magic_words#URL_data require their parameter to be a valid title, and ":" is not one.

You can achieve the same effect with {{SERVER}}{{SCRIPTPATH}}?diff=117674067, would replacing that cause a lot of trouble? (Is it hardcoded in pages, or just a couple of templates? If yes, we could probably special-case "" and ":" in that function, but I'd rather not do that :(
Comment 4 Umherirrender 2013-12-27 09:55:48 UTC
In my opinion fullurl:: was a hack, which now is broken, but that is always possible for hacks. A special case in fullurl: sounds not like a good idea.
Comment 5 Umherirrender 2013-12-27 11:23:46 UTC
A new hack could be #

{{fullurl:#|diff=117674067}}

But it sounds still like a hack
Comment 6 TMg 2013-12-28 17:45:14 UTC
I would love to have a [[Special:Diff/117674067]] syntax instead. Similar to [[Special:Permalink/117674067]]. But currently there is no better way to link to a diff. The suggested {{SERVER}}{{SCRIPTPATH}}?diff=117674067 syntax is more complicated.

Argument #1: It doesn't really matter if you call it a "hack". It worked. It did what it was supposed to do. Now it does not work any more. The change broke existing pages.

Argument #2: A {{fullurl:...}} should always be treaded as a core function and never as a template, no matter what's written after the colon. Currently it tries to transclude a non existing [[Template:Fullurl:]], [[Template:Fullurl::]] or worse. This is confusing.

Argument #3: All these are valid URLs:
https://de.wikipedia.org/w/?title=de:Wikipedia:Hauptseite
https://de.wikipedia.org/w/?title=Wikipedia:Hauptseite
https://de.wikipedia.org/w/?title=:
https://de.wikipedia.org/w/?title=
https://de.wikipedia.org/w/?title=de:Wikipedia:Hauptseite&diff=117674067
https://de.wikipedia.org/w/?title=Wikipedia:Hauptseite&diff=117674067
https://de.wikipedia.org/w/?title=:&diff=117674067
https://de.wikipedia.org/w/?title=&diff=117674067

Therefor all these calls of the fullurl function should create the same valid URLs as shown above:
{{fullurl:de:Wikipedia:Hauptseite}}
{{fullurl:Wikipedia:Hauptseite}}
{{fullurl::}}
{{fullurl:}}
{{fullurl:de:Wikipedia:Hauptseite|diff=117674067}}
{{fullurl:Wikipedia:Hauptseite|diff=117674067}}
{{fullurl::|diff=117674067}}
{{fullurl:|diff=117674067}}
Comment 7 Bartosz Dziewoński 2013-12-28 20:17:35 UTC
(In reply to comment #6)
> I would love to have a [[Special:Diff/117674067]] syntax instead.
> Similar to [[Special:Permalink/117674067]]. But currently there is
> no better way to link to a diff.

A patch for this is pending: https://gerrit.wikimedia.org/r/#/c/63395/ .
It needs some work, though.


> Argument #1: It doesn't really matter if you call it a "hack". It
> worked. It did what it was supposed to do. Now it does not work any
> more. The change broke existing pages.

No, that did not do what it was supposed to – in fact, it wasn't
supposed to work the way you used it.

I have already asked about the magnitude of the problems this caused in
comment 3 and have yet to receive an answer, but given that I haven't
heard any other reports that magnitude is rather small.


> Argument #2: A {{fullurl:...}} should always be treaded as a core
> function and never as a template, no matter what's written after the
> colon. Currently it tries to transclude a non existing
> [[Template:Fullurl:]], [[Template:Fullurl::]] or worse. This is
> confusing.

This might be a valid complaint. The behavior, however, is consistent
with the behavior of other magic words when they are called incorrectly;
if we want it changed, I think it should be done in a separate bug.


> Argument #3: All these are valid URLs:
> https://de.wikipedia.org/w/?title=de:Wikipedia:Hauptseite
> https://de.wikipedia.org/w/?title=Wikipedia:Hauptseite
> https://de.wikipedia.org/w/?title=:
> https://de.wikipedia.org/w/?title=
> https://de.wikipedia.org/w/?title=de:Wikipedia:Hauptseite&diff=117674067
> https://de.wikipedia.org/w/?title=Wikipedia:Hauptseite&diff=117674067
> https://de.wikipedia.org/w/?title=:&diff=117674067
> https://de.wikipedia.org/w/?title=&diff=117674067

That's not true, the third one now results in a "Bad title" error.
The seventh one only works because the 'title' parameter is ignored
when 'diff' is given.

Let me also note that in the fourth one the empty 'title' parameter
is filled with the 'Main Page' title (which is why visiting
"https://de.wikipedia.org/" works).


> Therefor all these calls of the fullurl function should create the
> same valid URLs as shown above: {{fullurl:de:Wikipedia:Hauptseite}}
> {{fullurl:Wikipedia:Hauptseite}} {{fullurl::}} {{fullurl:}}
> {{fullurl:de:Wikipedia:Hauptseite|diff=117674067}}
> {{fullurl:Wikipedia:Hauptseite|diff=117674067}}
> {{fullurl::|diff=117674067}} {{fullurl:|diff=117674067}}

{{fullurl: requires a valid title, and '' and ':' are not valid titles.
As I mentioned, we could add a hack to make that work, but I'd rather
not (without at least assessing the impact, see comment 3).

What would you expect {{fullurl:<>}} to do? {{fullurl::}} and
{{fullurl:}} behave in the same way.
Comment 8 Tyler Romeo 2013-12-28 21:09:27 UTC
I'm going to go ahead and agree that the intention of parser functions like this is that {{fullurl}} requires a valid Title object in order to operate properly. The proper method for custom URL construction would be just that: custom URL construction, probably using the method demonstrated in comment 3.

Because of this I'm going to close this bug. I am sorry that this broke your specific workflow, but unfortunately this was the result of using an undefined functionality that just so happened to work. Hopefully the Special:DiffLink patch provides a better alternative.
Comment 9 TMg 2013-12-29 13:30:30 UTC
(In reply to comment #7)
> that did not do what it was supposed to

It did. It was supposed to create valid links and that was exactly what it did. There was nothing wrong with the diff links it created. You broke an existing functionality. That's called a regression.

> I have already asked about the magnitude of the problems this caused in
> comment 3 and have yet to receive an answer, but given that I haven't
> heard any other reports that magnitude is rather small.

I'm sorry? You refuse to see a problem here. I got this. This does not mean the problem does not exist. The syntax is used in pretty much every bigger MediaWiki installation on many pages, mainly talk pages. It's almost impossible to track and fix all the now broken posts. It's a regression.

> > https://de.wikipedia.org/w/?title=:
> now results in a "Bad title" error.

How do you know this is not the same regression?

> the 'title' parameter is ignored when 'diff' is given.

Thats the point. fullurl should do the same. Simple.

> {{fullurl: requires a valid title, and '' and ':' are not valid titles.

Did I mentioned this is a regression? Using ":" was valid before. Now it's not. This is a regression.

> What would you expect {{fullurl:<>}} to do?

This is not connected to this report. These characters were always invalid in titles. Colons aren't invalid in titles. Using "<>" never worked. Using ":" did.

(In reply to comment #8)
> the intention of parser functions like
> this is that {{fullurl}} requires a valid Title object in order to operate
> properly. The proper method for custom URL construction would be just that:
> custom URL construction

Fact: fullurl is for custom URL construction.

Fact: A diff link does not need a title. It's ignored anyway.

Therefor: fullurl with a diff parameter must do the same and ignore the title.

> this broke your specific workflow

It broke existing pages.
Comment 10 Bartosz Dziewoński 2013-12-29 18:38:00 UTC
":" is not a valid title, and that's not a regression, but a bugfix. Empty titles are not valid, and ":" normalises to an empty title.

I have yet to see a single page broken by this.
Comment 11 Andre Klapper 2014-01-02 11:49:47 UTC
(In reply to comment #10)
> ":" is not a valid title, and that's not a regression, but a bugfix. Empty
> titles are not valid, and ":" normalises to an empty title.
> 
> I have yet to see a single page broken by this.

TMg: Link welcome.
Comment 12 TMg 2014-01-04 14:12:39 UTC
Check [[Special:WhatLinksHere/Template:fullurl::]] in every MediaWiki installation, e.g. [[de:Special:WhatLinksHere/Template:fullurl::]]. And this is only the tip of the iceberg. See [[en:Special:WhatLinksHere/Template:fullurl:]], for example. I'm not even sure if all now broken uses of the fullurl syntax can be found that way.

Please note that users already started to fix the most annoying cases.

I really don't understand why you are refusing to accept this report. It's a broken functionality. You can confirm it very, very easily: Try to use [{{fullurl::|diff=90530056}}] on a random page. It does not work any more. Confirmed.

It's really, really simple:

This still is a perfectly valid URL:
https://de.wikipedia.org/w/index.php?title=&diff=90530056

In other words, it's allowed to use an empty title in an URL. It wouldn't make any sense to block such URLs because of the title.

Therefor this use of fullurl must be valid too:
{{fullurl:|diff=90530056}}

It doesn't make any sense to force a valid title if it's ignored anyway.

Same with the colon in {{fullurl::|diff=90530056}}. The colon separates namespaces and interwiki prefixes from the title. We are using empty prefixes regularly, e.g. in ":File:Example.jpg".

https://en.wikipedia.org/w/?title=Main_page is a valid URL.
https://en.wikipedia.org/w/?title=en:Main_page is a valid URL.
https://en.wikipedia.org/w/?title=:Main_page is a valid URL.
https://en.wikipedia.org/w/?title= is a valid URL.

Therefor https://en.wikipedia.org/w/?title=: must be valid to. It does not make sense to allow everything else but to block this specific case. It's an empty title (which is resolved to the main page) prefixed with a colon. We are used to this pattern when linking to a File or Category. Why block it? I don't care if you call it an "abuse" or "hack" or whatever. We are using it. Every single use had a meaning and a purpose and produced a working URL. There was no problem. Now it's broken.
Comment 13 Bartosz Dziewoński 2014-01-04 17:29:24 UTC
(In reply to comment #12)
> Check [[Special:WhatLinksHere/Template:fullurl::]] in every
> MediaWiki installation, e.g.
> [[de:Special:WhatLinksHere/Template:fullurl::]]. And this is only
> the tip of the iceberg.

So I checked several large Wikipedias at random, including en, pl, es,
fr, zh, ja, it, sv, and the German Wikipedia seems to be literally the
*only* one having troubles with it – and what's more, they've already
fixed it by creating a template with that name (which is pretty
clever, I admit).


> See [[en:Special:WhatLinksHere/Template:fullurl:]], for example. I'm
> not even sure if all now broken uses of the fullurl syntax can be
> found that way.

{{fullurl:|whatever}} has *never* worked, ever since that parser
function was introduced, as far as I know. The pages listed there seem
to be templates or incorrect usages of templates.


> I really don't understand why you are refusing to accept this
> report. It's a broken functionality. You can confirm it very, very
> easily: Try to use [{{fullurl::|diff=90530056}}] on a random page.
> It does not work any more. Confirmed.

I have already explained, but let me repeat: it was not expected to
work that way, and it not working anymore (which is a side-effect of
fixing a different bug) does not seem to be a big trouble for anyone
(but you, I guess).


> Therefor https://en.wikipedia.org/w/?title=: must be valid to. It
> does not make sense to allow everything else but to block this
> specific case. It's an empty title (which is resolved to the main
> page) prefixed with a colon.

An empty title is resolved to the main page in only one, very specific
case: when we're deciding what to do with the 'title' URL parameter
(or a rewrite rule that maps something else to the title parameter).
In every other case it's an invalid title (we even have unit tests for
this).

Therefore, ':', which follows the pattern you speak of, is also an
invalid title.
Comment 14 Bartosz Dziewoński 2014-01-04 17:30:01 UTC
Sorry, I'll be unsubscribing from this bug, as I don't really care. Feel free to try to convince someone else to change this.
Comment 15 Andre Klapper 2014-02-26 14:35:16 UTC
Community members in comment 3, comment 4 and comment 8 have explained why this request will not be fixed and why a patch would be not be accepted. 
That translates to a WONTFIX which seems to describe well the reality. I don't think a rotting but open bug report that nobody will ever fix helps anybody.

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


Navigation
Links