Page MenuHomePhabricator

Implement filtering host pages of Special:WantedTemplates by namespace
Open, LowPublicFeature

Description

Author: romaine.wiki

Description:
We (on nl-wiki) would like the possiblity to have it possible to select namespaces in what the special page Special:WantedTemplates selects their non-existing templates. We would like to switch off the user-namespace and the user-talk-namespace. I think a drop down menu just as on Special:WhatLinksHere would be sufficient if we can select both the namespace with the connected namespace.

Thanks!


Version: unspecified
Severity: enhancement

Details

Reference
bz30758

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:57 PM
bzimport set Reference to bz30758.
bzimport added a subscriber: Unknown Object (MLST).

To clarify (after IRC conversation).

Right now the slow (cached) background query works as following:

  • Get all templatelinks [1]
  • Filter only those that tranclude out of NS_TEMPLATE (ie. ignore {{:Article}}, or {{User:Foo/Bar}})
  • Group rows that transclude the same template
  • Order by count

The query does not have [1] information on what the title or namespace of the host page is.
Even if it would know it (by doing an SQL JOIN), it would have nowhere to store it since the querycache table doesn't have space for that. If it would have space for it, it'd have to have a massive index to allow a live-filter on it.

The only solution that isn't unacceptably slow is to have separate querycaches for Wantedtemplates for each namespace and then a cache for all namespaces together, which is quite insane.

If there is a usecase for it, we might be able to come up with a better solution, but until then I'm marking this WONTFIX. If the data is needed only once or every once in a while, you may request the Toolserver users to perform the query for you in a long-running job and publish it for you to use. [2]

  • Krinkle

[1] the templatelinks table contains three columns:

  • namespace of page being trancluded (usually NS_TEMPLATE)
  • pagetitle of page being trancluded (ie. "Infobox")
  • pageid of host page calling the template (ie. the page doing {{Infobox}}).

[2]

mr.heat wrote:

I understand this is not easy to fix but nevertheless it should be fixed. Maybe it's possible to find a workaround or some alternative approach?

Currently, all Special:WantedTemplates pages in all Wikipedia projects are almost completely useless due to two problems:

The first is described in bug 12019 (things like an #ifexist count as a link).

The second is described above: There are a lot of concepts in the user namespace and archived discussions in all discussion namespaces with non-existing templates. All this is counted in the special page. Currently some people are trying to get rid of these template inclusions in the German Wikipedia but this highly disputed (archives should not be touched, for example).

What we really need is something like a Special:WantedTemplatesInArticles.

As said the lists (also Special:WantedPages) are useless now. Please help us making it useful again.

It would be great to have a list that excluded transclusions in the same namespaces that are excluded from Citation Style 1 error categorization (in en.WP at least), namely Book talk, Category talk, Draft, Draft talk, Education Program talk, File talk, Help talk, MediaWiki talk, Module talk, Portal talk, Talk, Template talk, TimedText talk, User, User talk, and Wikipedia talk. Transclusions and errors in those namespaces are sometimes not fixable (e.g. .js files in User space), are often examples that should not be "fixed", or do not degrade the reader's experience.

Including User pages in the report also results in false positives, like "Template:' + 'subst:afd‏‎" being listed on the report. Actually, this looks like a Wikimedia bug. I'll see if there is another phab report.

Assuming that the way these queries work has not changed since @Krinkle's comment in 2011, I would like to suggest the addition of a separate special page/query solely for non-existing template transclusions only in the main namespace. Currently, using WantedTemplates to clean up on pages in the main namespace (which is the one namespace where non-existent template transclusions are by definition unwanted) is incredibly inefficient by checking hundreds of pages just to see if the list of inclusions contains a main space article.

A list of just these transclusions in the main space would speed up and simplify important maintenance work massively.

Can we please have this report for main space pages?

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:00 AM
Aklapper removed a subscriber: wikibugs-l-list.