WordPress.org

Make WordPress Core

Opened 23 months ago

Last modified 17 months ago

#35330 new defect (bug)

Categories Format & Search Bug

Reported by: jawad96 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.4
Component: Menus Keywords:
Focuses: Cc:

Description

Hello,

I have been advised by WooCommerce to submit this to Wordpress as they deduced it was a Core problem and not related to WooCommerce. I have been able to re-produce this 3x, Once on SiteGround, another on Hostgator and also locally. This is on Wordpress 4.4.

Issue #1: After adding categories if I go to Appearance > Menu and search for a category no results are returned. Furthermore, if I was to go to second page of categories and then try and search for something then only placeholder text is written.

Issue #2: The problem occurred when I tried adding a lot of nested categories onto my WooCommerce categories. The format which I had was 9x Parent Categories, 5x Second Level Categories and under one of the Second Level Category are 11x Third Level Categories. If you were to view the categories via Appearance > Menu then the format is all broken. The WooCommerce support mentions as soon as pagination is involved then the format breaks. He also said "It looks like the way WordPress is handling the Taxonomy is incorrect".

Please confirm if you can reproduce or need further details.

Many Thanks,
Jawad

Change History (4)

This ticket was mentioned in Slack in #core by jawad. View the logs.


23 months ago

#2 follow-up: @dd32
23 months ago

Hi @jawad96

Issue #1: After adding categories if I go to Appearance > Menu and search for a category no results are returned. Furthermore, if I was to go to second page of categories and then try and search for something then only placeholder text is written.

The search is at present only returning categories which have posts/products in them (or in a sub category of it).

I think this might be deliberate - A category which has no posts will link to an empty/404 archive, it seems strange to want that on the menu. However, the UX of not showing that category in the search results seems really bad.

Issue #2: If you were to view the categories via Appearance > Menu then the format is all broken.

I've been able to confirm this as well. In order to trigger it you need to add a lot of root-level categories so that it triggers paging (Yes, there's actually paging in this "Vew all" area..), and then add multiple levels of items to something on the first page.
What ends up happening is that the children elements of the category hierarchy are not returned in the first paged results in the menu editor, and as a result do not show. I suspect this is because the child/grandchild elements are in a later set of paged results.

#3 @vishalkakadiya
17 months ago

Hi @dd32,

I am not an expert but need to know more about below thing.

I want to ask one question about search thing, that in "VIEW ALL" if we fetch all(including category which has no post) the category then why we not cover that category in search results ?

User can add category link by "View All" tab also then also it will get 404. And think on other way that user want to display only category-name and category-description no matter that category has post or not.

Thanks.
.

#4 in reply to: ↑ 2 @SergeyBiryukov
17 months ago

Replying to dd32:

Issue #2: If you were to view the categories via Appearance > Menu then the format is all broken.

I've been able to confirm this as well. In order to trigger it you need to add a lot of root-level categories so that it triggers paging (Yes, there's actually paging in this "Vew all" area..), and then add multiple levels of items to something on the first page.

Related: #18282, #19837, #20351.

Note: See TracTickets for help on using tickets.