Page MenuHomePhabricator

DBQ-30 List of templates used only in the user namespace
Closed, ResolvedPublic

Description

This issue was converted from https://jira.toolserver.org/browse/DBQ-30.
Summary: List of templates used only in the user namespace
Issue type: Task - A task that needs to be done.
Priority: Minor
Status: Done
Assignee: (none)


From: Thetrick <hetrickt@yahoo.com>

Date: Sun, 29 Jun 2008 15:38:57

A list of templates transcluded only in the user namespace (not links). This is in order to identify personal templates (navboxes, page headers, etc.) residing in the template namespace. Formatting should be as [[Template:templatenamehere]] in a text file, just like DBQ28. Thanks.


Version: unspecified
Severity: minor

Details

Reference
bz59286

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:20 AM
bzimport set Reference to bz59286.

From: DaB. <dab@ts.wikimedia.org>

Date: Sun, 29 Jun 2008 15:52:33

for enwp?


From: Thetrick <hetrickt@yahoo.com>

Date: Sun, 29 Jun 2008 16:04:50

Yes, en.wikipedia.org. Apologies for not being specific.

Also, as with DBQ28, how can I get this re-run in a few weeks: ask here, or open a new task?

And to further revise and extend, by "user namespace" I mean both the user and user_talk namespaces (2 and 3, I believe).


From: Thetrick <hetrickt@yahoo.com>

Date: Mon, 07 Jul 2008 16:45:23

Greetings. Is this being worked at all? Thanks.


From: Thetrick <hetrickt@yahoo.com>

Date: Thu, 10 Jul 2008 21:58:06

Hello?


From: Misza <misza1313@gmail.com>

Date: Sun, 13 Jul 2008 11:42:20

This strikes me as something that won't work as you expect.

For example, most Wikipedia templates are listed (as in, transcluded as an example) somewhere on http://en.wikipedia.org/wiki/Wikipedia:Template_messages - that would be one hell lot of exclusions to hardcode in the query.

There can also be other uses - see http://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:Userpage (a typically userspace-only template) and browse through different namespaces to see how often the algorithm fails (there's even one article space use on http://en.wikipedia.org/wiki/Editor:Gangsta36t because someone confused the userspace name).

Please confirm that this is indeed what you want (for example, Template:Userpage would not be listed in the result).


From: SQL <sxwiki@gmail.com>

Date: Wed, 13 Aug 2008 18:00:30

Done, see http://toolserver.org/~sql/DBQ/30.txt.gz

I agree with the above, however, that you might not find this the most useful thing.

Query is at http://toolserver.org/~sql/DBQ/30.sql if anyone needs to rerun it. Takes about half an hour on enwiki_p.


From: MZMcBride <mzmcbride@gmail.com>

Date: Fri, 15 Aug 2008 19:30:17

The list generated includes templates like http://en.wikipedia.org/wiki/Template:! and http://en.wikipedia.org/wiki/Template:Ambox

Clearly something's borked.


From: SQL <sxwiki@gmail.com>

Date: Fri, 15 Aug 2008 19:46:08

Interesting, I wonder where I went wrong.


From: CBM <cbm.wikipedia@gmail.com>

Date: Fri, 15 Aug 2008 22:11:25

What went wrong is that the page_namespace in the final subquery was already limited to equal 2 earlier on, so the subquery can never return any rows.

Here's a query that should generate more useful data:

select concat('[[Template:',t_title,']] ', page_is_redirect)
from (select distinct tl_title as t_title from templatelinks
where tl_namespace = 10) as temp
join page on page_namespace = 10 and page_title = temp.t_title
where not exists
(select 1 from page join templatelinks
on page_id = tl_from and tl_namespace = 10
where tl_title = t_title and page_namespace != 2 );

I put the results at http://toolserver.org/~cbm/data/DBQ-30.txt


From: SQL <sxwiki@gmail.com>

Date: Sat, 16 Aug 2008 04:55:25

Appears to have gotten it, thank you CBM ![][1]

[1]: https://jira.toolserver.org/images/icons/emoticons/smile.gif

This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: (none)
CC list: cbm.wikipedia@gmail.com, b@mzmcbride.com, wikimedia-bugzilla@dabpunkt.eu, misza@misza.net, sxwiki@gmail.com