Skip to content

WP 6.2 Categories-list block wrongly displays & counts non-existing uncategorized posts #49983

Closed

Description

@Humanify-nl

Description

The categories-list block does not behave accordingly.

This is in Dutch but should illustrate the problem:

image

It shows 9 posts as uncategorized (that do not exist). When clicked on this 'niet-gecategoriseerd' (= uncategorized), it shows zero posts, because none are actually uncategorized. 'Show empty categories' setting is also not turned on.

Here we see the category list in admin:
image
9 posts are said to be uncategorized, but they aren't. Clicking on the numbered link shows no posts.

Empty categories should never show. There should never be a link to an empty uncategorized category archive that nobody wants.

Opinionated remark:

It is 2023, site editor is out of beta, but we need basic functionality like taxonomies to work. This is an age old WP problem: "No category" should mean "no category".

There is no use for a 'uncategorized' category, it defeats the whole purpose of what a category is. This old fallback catch-all mechanism needs to be revised. Make it optional instead of mandatory. Remove it, put it in a filter (wp_use_default_category, __return_true) for those poor souls who actually use it. I'm pretty sure nobody is going to miss it.

Step-by-step reproduction instructions

  • Add a couple posts
  • Make sure all of them have a category (not uncategorized)
  • Add the categories-list block in a category template
  • Notice the above described problem (uncategorized seems attached as a hidden category for all posts)

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.2
  • No Gutenberg plugin

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. github-actions commented on May 14, 2023

    @github-actions

    Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

  2. added
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on May 14, 2023
  3. Humanify-nl commented on May 15, 2023

    @Humanify-nl
    Author

    @Thelmachido since this is now marked as stale, because of ‘the needs more info tag’… do you have any specification as to ‘what info it needs’?

    I thought I had carefully documented the issue.

  4. removed
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on May 16, 2023
  5. github-actions commented on May 31, 2023

    @github-actions

    Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

  6. added
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on May 31, 2023
  7. added
    Needs TestingNeeds further testing to be confirmed.
    and removed
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Jun 30, 2023
  8. priethor commented on Jun 30, 2023

    @priethor
    Contributor

    Thanks for the detailed reporting, @Humanify-nl. I'm moving it to Needs testing instead 🙂

  9. added
    [Type] BugAn existing feature does not function as intended
    on Jul 26, 2023
  10. jordesign commented on Jul 26, 2023

    @jordesign
    Contributor

    Hi @Humanify-nl - as we get to close to WordPress 6.3 releasing - I'd be interested to know if you still see the same behaviour if you test with that.

    I also wanted to ask if you've been able to test this with all plugins disabled, and a default theme (like TwentyTwentyThree) to see if it still happens?

  11. Humanify-nl commented on Jul 26, 2023

    @Humanify-nl
    Author

    @jordesign I'm very busy and not able to test this on short notice. I haven't ran into it anymore. This was an isolated case where I used categories and that seldomly happens. Since no other reports have been made I'll assume this was a database problem.

    The other critique is still valid though, as from my experience, the uncategorized label is one of the main reasons many big web developing businesses never use native category and use a custom tax instead, or have some code to rename it (still defeats the purpose).

    No client ever in any case wants to see 'uncategorized' label on their blog post. It is a long standing issue in my book, and i've never seen an explanation as to why this is a good idea (it feels like a fallback that is lingering for no reason).

    But I should make a separate ticket on that as it has nothing to do with bugs.

  12. jordesign commented on Jul 26, 2023

    @jordesign
    Contributor

    Hey @Humanify-nl - I have a feeling the reason for this is that the 'uncategorized' category is merely a default - and is able to be renamed to whatever 'category' is desired.

    As you mentioned - I'll close this issue. I'd suggest if you want to raise discussion about changing that default behaviour - the best place to do it would be the Core WordPress Trac.
    https://core.trac.wordpress.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Block] CategoriesAffects the Categories Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions