Page MenuHomePhabricator

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__.

Event Timeline

XXN raised the priority of this task from to High.
XXN updated the task description. (Show Details)
XXN added a project: MediaWiki-Categories.
XXN subscribed.
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 raised the priority of this task from Low to Medium.Apr 15 2015, 4:55 PM
XXN updated the task description. (Show Details)

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)

Edited to specify: soft redirected categories.

Bugreporter subscribed.

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 Medium to High.Jan 26 2017, 3:17 PM
Swpb lowered the priority of this task from High to Medium.
Swpb subscribed.

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

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.

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.)

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.

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.

@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