Allow excluding soft redirected categories on Special:UnusedCategories
Closed, ResolvedPublic

Description

Special:UnusedCategories is flooded by tons of soft-redirected categories. But purpose of this special page was to show real unused categories, not all unused ”aliases” aka redirecting categories. It's necessary to define a special magic word which can be placed in ”Template:Category redirect” and will prevent categories containing it from showing up in Special:UnusedCategories. Such a thing is really necessary, because some wikipedias have over 15,000 redirected categories.

A similar technology is used for Special:DisambiguationPages where are listed all pages which contains the tag __DISAMBIG__.

XXN created this task.Apr 14 2015, 4:46 PM
XXN updated the task description. (Show Details)
XXN raised the priority of this task from to High.
XXN added a project: MediaWiki-Categories.
XXN added a subscriber: XXN.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 14 2015, 4:46 PM
XXN set Security to None.
Aklapper lowered the priority of this task from High to Low.Apr 15 2015, 4:32 PM

Thanks for reporting this.
Could you please describe the actual problem instead of one possible solution? :)

Also, lowering priority as per guidelines. If there are strong arguments why this task should have higher priority, looking at the existing high priority tasks, please provide these arguments here. Thanks. :)

Aklapper renamed this task from Enhancement to Special:UnusedCategories to Allow excluding redirected categories on Special:UnusedCategories.Apr 15 2015, 4:32 PM
XXN updated the task description. (Show Details)Apr 15 2015, 4:55 PM
XXN raised the priority of this task from Low to Normal.

If it's a proper redirect page, it won't show up on Special:UnusedCategories (because the database query in UnusedCategories excludes redirect pages). Instead of doing an actual redirect, if the wiki uses "soft redirects" like placing a {{Category redirect}} on the redirect page, it will show up on Special:UnusedCategories because MediaWiki doesn't recognize it as a redirect page.

XXN renamed this task from Allow excluding redirected categories on Special:UnusedCategories to Allow excluding soft redirected categories on Special:UnusedCategories.Feb 6 2016, 7:41 PM
XXN updated the task description. (Show Details)
XXN updated the task description. (Show Details)
XXN added a comment.Feb 6 2016, 7:44 PM

Edited to specify: soft redirected categories.

Bugreporter reopened this task as Open.Aug 11 2016, 8:53 PM
Bugreporter added a subscriber: Bugreporter.

I have reopened the bug I merged as duplicate (which can still be resolved in similar way), as it's about different special pages.

Swpb raised the priority of this task from Normal to High.Jan 26 2017, 3:17 PM
Swpb lowered the priority of this task from High to Normal.
Swpb added a subscriber: Swpb.
Swpb added a comment.Jan 26 2017, 3:24 PM

Please prioritize this bug - it has been a complaint of several editors.

Aklapper updated the task description. (Show Details)Jan 26 2017, 4:41 PM

To get some progress here, anybody is very welcome to use developer access to submit a proposed code change as a Git branch directly into Gerrit. Additionally and in general, maintainers who could potentially be contacted are listed on https://www.mediawiki.org/wiki/Developers/Maintainers (though I can imagine this code area is not really maintained.) Thanks in advance!

This proposal is selected for the Developer-Wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) of the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.

Tgr updated the task description. (Show Details)Feb 5 2017, 9:02 AM
Dvorapa added a subscriber: Dvorapa.Feb 6 2017, 9:44 AM
Dvorapa updated the task description. (Show Details)Feb 6 2017, 9:52 AM
Tgr added a subscriber: Tgr.Feb 28 2017, 1:22 AM

Basically, create a magic word for soft redirects, store it into page props, add a filter to Special:UnusedCategories?
(What would "allow" mean, something like a checkbox? Query special pages are cached, not sure it's easy to add options to them.)

Agabi10 claimed this task.Sep 7 2018, 6:21 PM

Based on the latest comment by @Tgr I'm working on implement this one without the filtering option, so if someone puts the __EXPECT_UNUSED_CATEGORY__ behavioral switch in a page it won't be listed in the Special:UnusedCategories page. Should I add a Special page listing categories that should be empty but have at least one page categorized in them too?

Change 458909 had a related patch set uploaded (by Agabi10; owner: Agabi10):
[mediawiki/core@master] Add a way to exclude categories from Special:UnusedCategories

https://gerrit.wikimedia.org/r/458909

Thanks to @eranroz for calling me. Well, I think it can be very useful feature. But for me, soft redirect isn't the main issue, but tracking categories. There are thousands that we try to keep emptied, and removing them from the special page will be very helpful. About the list of excluded categories, excluded and empty categories, or excluded and non empty categories - I do not really care, because I can use query. But on large wikis it can't cope with this, so these lists can help too.

Dvorapa removed a subscriber: Dvorapa.Sep 26 2018, 12:23 PM

Change 458909 merged by jenkins-bot:
[mediawiki/core@master] Add a way to exclude categories from Special:UnusedCategories

https://gerrit.wikimedia.org/r/458909

The first part is already done. Now the only thing missing is the Special Page to list categories that should be empty but have at least one member. Any suggestion for the name of that Special Page?

The first part is already done. Now the only thing missing is the Special Page to list categories that should be empty but have at least one member. Any suggestion for the name of that Special Page?

maybe [[Special:Categories to empty]]

Change 474769 had a related patch set uploaded (by Agabi10; owner: Agabi10):
[mediawiki/core@master] [WIP][DNM] Add Special:Categories to empty

https://gerrit.wikimedia.org/r/474769

Once that latest patch is merged I think we can consider this task resolved, at least unless we want a Special:ExpectedEmptyCategories too to get the whole list of categories with that page property. I don't think I would ever use a page listing all the empty categories that should be empty (regardless of whether they are empty or not) ever, but I can implement it too if it is really useful for some use case.

eranroz closed this task as Resolved.Tue, Nov 20, 5:52 AM

@Agabi10 thank you for working on this feature. It can be considered as resolved thanks to https://gerrit.wikimedia.org/r/#/c/458909/

Once that latest patch is merged I think we can consider this task resolved, at least unless we want a Special:ExpectedEmptyCategories too to get the whole list of categories with that page property. I don't think I would ever use a page listing all the empty categories that should be empty (regardless of whether they are empty or not) ever, but I can implement it too if it is really useful for some use case.

[[Special:Pagesbyprop]] can list all such categories (regardless of whether they are empty or not), if there will be a later request for a dedicated special page to list non empty categories this can be considered in a seperate task.

Change 475567 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] parser: Remove aliases for EXPECTUNUSEDCATEGORY

https://gerrit.wikimedia.org/r/475567

Change 475567 merged by jenkins-bot:
[mediawiki/core@master] parser: Remove aliases for EXPECTUNUSEDCATEGORY

https://gerrit.wikimedia.org/r/475567