Last modified: 2013-04-08 11:02:49 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 T25816, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23816 - Missing file (red link) tracking category support
Missing file (red link) tracking category support
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on: 16112
Blocks: 33033
  Show dependency treegraph
 
Reported: 2010-06-06 21:00 UTC by Betacommand
Modified: 2013-04-08 11:02 UTC (History)
8 users (show)

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


Attachments
patch to add a tracking category for broken images. (2.65 KB, patch)
2011-04-20 05:05 UTC, Bawolff (Brian Wolff)
Details

Description Betacommand 2010-06-06 21:00:49 UTC
I was chatting in #mediawiki about the best method for adding a hidden tracking category to pages in order assist in identifying and tracking pages that embed missing/deleted files. http://en.wikipedia.org/w/index.php?title=Counties_of_Uganda&oldid=340942829 is one example of a page which was badly in need to cleanup. Adding built in support for this type of tracking would make maintaining content a lot easier. Platonides suggested implementing this as part of the parser, which makes perfect sense since its used at every purge/refresh/save process
Comment 1 Conrad Irwin 2010-06-06 22:58:02 UTC
There's [[Special:WantedFiles]] but it seems to be horribly broken at the moment -  I imagine that's due to the difficulty of keeping the information up to date automatically with remote file repos
Comment 2 Betacommand 2010-06-07 00:26:44 UTC
That uses a database query which does not scale well with large wikis, and it tracks files not the articles where they are used. Its a lot easier with a list if pages to fix, than it is to track down each files usage
Comment 3 Nemo 2011-04-19 21:00:20 UTC
(In reply to comment #1)
> There's [[Special:WantedFiles]] but it seems to be horribly broken at the
> moment -  I imagine that's due to the difficulty of keeping the information up
> to date automatically with remote file repos

It's bug 6220.
Comment 4 Mark A. Hershberger 2011-04-19 21:14:45 UTC
I think bug #16112 would take care of this, but I'm not sure.  Putting it as a blocker on this.
Comment 5 Betacommand 2011-04-19 21:18:27 UTC
Not really, fixing bug 16112 would help making the missing files special page easier to work with, but this request serves a different purpose, I find these types of tracking categories (similar to what happens with Special:Cite errors) makes fixing this easier to fix. ~~~~
Comment 6 Bawolff (Brian Wolff) 2011-04-20 05:05:52 UTC
Created attachment 8432 [details]
patch to add a tracking category for broken images.

This is fairly trivial to do if we really want to add a tracking category for this.


So do we really want to add a tracking category for this sort of thing?
Comment 7 Bawolff (Brian Wolff) 2011-04-20 05:13:35 UTC
(In reply to comment #6)
> Created attachment 8432 [details]
> patch to add a tracking category for broken images.
> 
> This is fairly trivial to do if we really want to add a tracking category for
> this.
> 
> 
> So do we really want to add a tracking category for this sort of thing?

btw, just to clarify - I can commit said patch, I'm just not sure if this is a bug we want to fix, or if its a wontfix type thing due to duplication (with the rather borked) special:wantedfiles.
Comment 8 p858snake 2011-04-20 05:31:22 UTC
(In reply to comment #7)
> btw, just to clarify - I can commit said patch, I'm just not sure if this is a
> bug we want to fix, or if its a wontfix type thing due to duplication (with the
> rather borked) special:wantedfiles.
Perhaps we could do this, and then also have wantedpages display the results of the category (basically fixing two things in one then.... because a category would be easier if any bots wanted to access it I would assume).
Comment 9 Mark A. Hershberger 2011-04-20 12:13:07 UTC
(In reply to comment #7)

> btw, just to clarify - I can commit said patch, I'm just not sure if this is a
> bug we want to fix, or if its a wontfix type thing due to duplication (with the
> rather borked) special:wantedfiles.

Would this have less brokenness than special:wantedfiles?  Or would it be similar?

If I understand this (no guarantee that I do), then a hidden category is going to have more consistency than the clean-up that WantedFiles relies on.
Comment 10 p858snake 2011-04-20 12:17:49 UTC
(In reply to comment #9)
> Would this have less brokenness than special:wantedfiles?  Or would it be
> similar?
(Without looking at how the patch works) Well if a remote file existed it shouldn't produce a red link so it shouldn't add it to the category.
Comment 11 Mark A. Hershberger 2011-04-20 14:46:17 UTC
(In reply to comment #10)
> Well if a remote file existed it shouldn't produce a red link so it shouldn't
> add it to the category.

So, then, that means "less brokenness", right?
Comment 12 Betacommand 2011-04-20 15:11:47 UTC
Not being able to read php I would assume that this modifies the parser or similar component so that during parsing of the page it checks to see if a file being used exists (both locally and remotely) and if it does not exists it inserts a tracking category. this would solve the brokenness of wanted files because it does not use a single query (which causes too much stress on large projects) and is constantly updated when a page is re-parsed. (I assume that this is being added via a mediawiki namespace message would give finer grain control of which pages get added to it so that different namespaces could be given different categories)
Comment 13 Bawolff (Brian Wolff) 2011-04-20 19:45:50 UTC
ok, fixed in r86534.


Note this is slightly different from special:wantedfiles, since wantedfiles is ordered by how many broken links their are to the file.
Comment 14 Betacommand 2011-07-18 14:51:21 UTC
Fix was reverted in trunk
Comment 15 Sam Reed (reedy) 2011-07-18 14:52:04 UTC
(In reply to comment #14)
> Fix was reverted in trunk

It's been marked fixme, not reverted...
Comment 16 Bawolff (Brian Wolff) 2011-08-25 01:49:19 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > Fix was reverted in trunk
> 
> It's been marked fixme, not reverted...

And the issues have now been resolved, so remarking this bug as fixed.

cheers.
Comment 17 Gregor Hagedorn 2011-12-31 16:06:54 UTC
I think this needs to be better documented. Is it already somewhere where I overlooked it? Please add some documentation on mediawiki.org - I am not sure where, but 

Release notes only mentions:
* (bug 23816) A tracking category is now added for any pages with broken images.

I figured out that the attachment uses Mediawiki:broken-file-category which needs to be executed on local wiki to find the local string. Some results:

http://www.mediawiki.org/wiki/Category:Pages_with_broken_file_links
in German:
http://www.mediawiki.org/wiki/Kategorie:Seiten mit defekten Dateilinks 
in German Wikipedia changed to:
http://de.wikipedia.org/wiki/Kategorie:Wikipedia:Defekter_Dateilink
Comment 18 Nemo 2011-12-31 16:29:40 UTC
(In reply to comment #17)
> I think this needs to be better documented. Is it already somewhere where I
> overlooked it? Please add some documentation on mediawiki.org - I am not sure
> where, but 

AFAIK tracking categories are not documented on mww (or anywhere else, actually), they're left to local categorization. Which is not very good, but that's bug 1 I guess.

> I figured out that the attachment uses Mediawiki:broken-file-category which
> needs to be executed on local wiki to find the local string.

Not really, you just have to follow the usual system: [[:translatewiki:Special:PrefixIndex/MediaWiki:Broken-file-category/]].
Comment 19 Gregor Hagedorn 2011-12-31 17:10:26 UTC
> Not really, you just have to follow the usual system:
> [[:translatewiki:Special:PrefixIndex/MediaWiki:Broken-file-category/]].

(translatewiki interwiki link is not a feature of mediawiki, although present on WMF sites).

Yes, rather than checking only your own translation, you can find all applicable translation under:

http://translatewiki.net/w/i.php?title=Special%3APrefixIndex&prefix=Broken-file-category%2F&namespace=8

However, if logged in, you need to look under the "native" language of the wiki, which may differ from the language in which the Wiki user interface is displayed.

> AFAIK tracking categories are not documented on mww (or anywhere else,
actually), Which is not very good, but that's bug 1 I guess.

I agree; created Bug 33448.
Comment 20 Krinkle 2011-12-31 18:04:17 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > btw, just to clarify - I can commit said patch, I'm just not sure if this is a
> > bug we want to fix, or if its a wontfix type thing due to duplication (with the
> > rather borked) special:wantedfiles.
> Perhaps we could do this, and then also have wantedpages display the results of
> the category (basically fixing two things in one then.... because a category
> would be easier if any bots wanted to access it I would assume).

No, bots can access querypages just as easy as categorymembers. Both have APIs:
* https://www.mediawiki.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Templates
* https://www.mediawiki.org/w/api.php?action=query&list=querypage&qppage=Wantedfiles
Comment 21 Bawolff (Brian Wolff) 2011-12-31 23:22:53 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > I think this needs to be better documented. Is it already somewhere where I
> > overlooked it? Please add some documentation on mediawiki.org - I am not sure
> > where, but 
> 
> AFAIK tracking categories are not documented on mww (or anywhere else,
> actually), they're left to local categorization. Which is not very good, but
> that's bug 1 I guess.
> 

I've added [[mw:Help:Tracking_categories]] which should hopefully help somewhat

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


Navigation
Links