Last modified: 2014-07-03 02:52:00 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 T47152, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45152 - Fake links on default system messages shouldn't add entries to Special:WantedFiles and siblings
Fake links on default system messages shouldn't add entries to Special:Wanted...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.19.3
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-19 15:17 UTC by mdowdell
Modified: 2014-07-03 02:52 UTC (History)
9 users (show)

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


Attachments

Description mdowdell 2013-02-19 15:17:16 UTC
MediaWiki pages that contain redlinked files by default, and example being MediaWiki:Filerevert-intro (there may be others), create wanted files when the page is created and the redlink remains. It appears to be because the redlink links to Special:Upload rather than the file page.

Creating the file page with something doesn't work - the system does not appear to recognise the page as being created unless there is an actual file there. Nothing can be uploaded in place of the file as the file type, such as .jpg or .png is added to the end of the file name whether you want it or not.
Comment 1 Andre Klapper 2013-02-20 13:47:43 UTC
MediaWiki:Filerevert-intro is a (translatable) message shown in the user interface, and the red link $1 is a placeholder for a variable (but I guess you know all that). Hence not sure if I understand the problem correctly ("because the redlink links to Special:Upload rather than the file page"), and where this is exposed to "normal" users that don't look up UI strings in the MediaWiki: namespace?

Assuming you run MediaWiki 1.19.1 I'd first recommend to upgrade to 1.19.3 and check if the problem remains (likely nothing will change, but at least you'd run a supported version).
Comment 2 mdowdell 2013-02-20 14:18:17 UTC
I've also corrected the Mediawiki version, it is 1.19.3, I apparently misread it. Either way, I'm coming from Wikia and have no way to update MediaWiki versions, not forgetting the last upgrade Wikia did was from 1.16. I'm also aware of how $1 (or $2, $3, etc.) are variables altered depending on usage.

As an example, the link references /wiki/Special:Upload?wpDestFile=$1 an example of which can be seen http://camtest.wikia.com/wiki/MediaWiki:Filerevert-intro as opposed to linking to the filepath that would be there when the image has been uploaded. When the page is created it then links to the file - http://camtest.wikia.com/wiki/Special:WhatLinksHere/File:$1. You'll notice I've also created File:$1 redirecting it to another, which doesn't resolve the issue.

I wouldn't say this poses any major problem, likely there's not very much point in adding to the page under normal circumstances. It just seems a little odd to have a system message that automatically creates a redlink as soon as it's created.

I assume the same is true of links to [[User:$1]], [[$1]], etc. which are normally redirected to a placeholder page in my experience, although in this case that doesn't work. It would probably be nice to recognise those as issues here too. Perhaps those should automatically redirect to a placeholder system message?
Comment 3 Bawolff (Brian Wolff) 2013-02-20 15:49:34 UTC
(In reply to comment #2)
> I've also corrected the Mediawiki version, it is 1.19.3, I apparently misread
> it. Either way, I'm coming from Wikia and have no way to update MediaWiki
> versions, not forgetting the last upgrade Wikia did was from 1.16.

I'm pretty sure this issue would still be present on latest (git) mediawiki, so don't worry about versions too much.

>I'm also
> aware of how $1 (or $2, $3, etc.) are variables altered depending on usage.
> 
> As an example, the link references /wiki/Special:Upload?wpDestFile=$1 an
> example of which can be seen
> http://camtest.wikia.com/wiki/MediaWiki:Filerevert-intro as opposed to
> linking
> to the filepath that would be there when the image has been uploaded. When
> the
> page is created it then links to the file -
> http://camtest.wikia.com/wiki/Special:WhatLinksHere/File:$1. You'll notice
> I've
> also created File:$1 redirecting it to another, which doesn't resolve the
> issue.
> 
> I wouldn't say this poses any major problem, likely there's not very much
> point
> in adding to the page under normal circumstances. It just seems a little odd
> to
> have a system message that automatically creates a redlink as soon as it's
> created.

You're correct it is a little odd. However, we would still want to recognize  red links though as a missing file if someone just added [[file:nonexistent.jpg]] to some message. So we don't want to ignore them in general. Maybe there could be special casing for links to $<number>, only in mediawiki namespace, to not register the link in the link tables.

> 
> I assume the same is true of links to [[User:$1]], [[$1]], etc. which are
> normally redirected to a placeholder page in my experience, although in this
> case that doesn't work. It would probably be nice to recognise those as
> issues
> here too. Perhaps those should automatically redirect to a placeholder system
> message?

I think the automatic redirect to a place holder is something the users manually make, not something that mediawiki does itself. The reason the file link doesn't follow redirects, is that the page [[file:$1]] is a page redirecting to a non-file page, where the actual link text is [[media:$1]] which should link directly to the image in question (not its description page). If the link was [[:file:$1]] (Note leading colon) then the redirect would work more as expected.


---
moving component to i18n. This isn't really a file management issue as the issue is present for other link types too. This is more a parser or i18n issue imo
Comment 4 Nemo 2013-02-21 10:05:33 UTC
(In reply to comment #3)
> However, we would still want to recognize 
> red links though as a missing file if someone just added
> [[file:nonexistent.jpg]] to some message. So we don't want to ignore them in
> general. Maybe there could be special casing for links to $<number>, only in
> mediawiki namespace, to not register the link in the link tables.

So how's this an i18n problem? Seems about fixing the query pages. Probably a WONTFIX anyway, I don't see much value in it.
Comment 5 Bawolff (Brian Wolff) 2013-02-21 13:30:41 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > However, we would still want to recognize 
> > red links though as a missing file if someone just added
> > [[file:nonexistent.jpg]] to some message. So we don't want to ignore them in
> > general. Maybe there could be special casing for links to $<number>, only in
> > mediawiki namespace, to not register the link in the link tables.
> 
> So how's this an i18n problem? Seems about fixing the query pages. Probably a
> WONTFIX anyway, I don't see much value in it.

By special casing the i18n system to think those are not links for the purpose of linksupdate (as one possible solution). Perhaps thats really more the parser component. I agree this is a rather low priority issue ( but dont quite think its a wontfix).

Its presumably not just the query pages that we would want to change but anywhere that queries the link tables (special:whatlinkshere, various api calls) thus probably better to just not register such links in the first place.
Comment 6 Niklas Laxström 2013-02-23 10:35:35 UTC
At translatewiki.net we use certain hooks to suppress categories on pages in MediaWiki: and other translation namespaces for everything except /qqq pages. I'd also like to use the TextContent type for those pages when it is less buggy.
Comment 7 Bawolff (Brian Wolff) 2014-07-03 02:52:00 UTC
Looking back on this, part of me is tempted to do something along the line of

and il_to not like '$_';

in Special:Wantedfiles, as a hack to make them stop appearing. Not sure if that's silly.

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


Navigation
Links