question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't show hidden categories in suggested categories

See original GitHub issue

Summary: When uploading an image, we ask users to add categories relevant to the image. Currently, the list of categories that we show also includes hidden categories. According to the Commons page about hidden categories:

Many non-topical categories are marked with HIDDENCAT or {{Hiddencat}} on the category page.

As they’re non-topical there’s not much use in suggesting those categories. Also, I’ve observed that hidden categories are generally added automatically to the corresponding pages and are not meant to be manually added by users. Examples:

There really seem to be a lot of hidden categories in Commons. Not showing the hidden categories would improve the relevancy of the category search results as it would reduce a lot of irrelevant categories, IMO.

API that could be used

We can identify hidden categories by sending the acprop=hidden to the allcategories API. There seems to be a limitation though. The generator version of that API doesn’t seems to be considering the gacprop=hidden parameter sent to it. Something to look into if we consider doing this.

Example API queries (for reference)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
misaochancommented, Jun 29, 2020

Personally I agree that hidden categories should not be shown. However I think the best way to solve this would be to wait for upstream to make the changes, rather than making a switch prematurely (wasted resources if they are going to do it anyway, and potential side effects).

1reaction
sivaraamcommented, Jun 26, 2020

@PaulinaQuintero You’re observation is right. The generator doesn’t consider gacprop=hidden as mentioned in the description. I think the related code also confirms this.

Indeed, requesting the generator API to consider the gacprop=hidden would be the easiest way to solve this. As a first step, search for already open issues related to this on https://phabricator.wikimedia.org/ If you couldn’t find any please open a new one with the MediaWiki-API tag.

That would take some time. In the mean time, let’s see if someone here could weigh in on whether switching to the list version of the API is a good/bad thing. cc @maskaravivek @misaochan

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Hide Categories from the Homepage in WordPress
Go to Settings and click on the Category Excluder option. On this screen, you can choose which categories you want to show.
Read more >
How to Show / Hide Categories in WordPress (Ultimate Guide)
In this code, we have hidden the categories by adding the exclude parameter. Next to it, you need to provide the IDs of...
Read more >
How to Hide Categories for Specific Users in WordPress
Scroll down on the same page. Make sure the Show protected categories are unticked so that the protected categories are hidden from public...
Read more >
Hiding categories - HCL Product Documentation
You can hide a category in your catalog so that it does not display to customers, for example, if the category contains out-of-season...
Read more >
Hide categories with no visible products and don't count ...
Ensure the "Show empty categories" option is off (Empty categories should be hidden) and "Show product count" is on. Add a new category....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found