WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#40827 closed defect (bug) (duplicate)

WP Regular post categories bug also affects Woocommerce products categories

Reported by: raykaii Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.5
Component: Menus Keywords:
Focuses: ui, administration Cc:

Description

HI,

i have found a bug that is causing me lot of frustration when doing menus using categories.

There is a bug with the categories nesting/child categories on the menu create page. When having many sub-nesting/child categories when the category list has over 50 nested categories and the category small menu auto creates a second page then it messes up the categories nesting.

This is hard to explain.

On this 1st image, is when some sub-nesting/child categories fit on one page. this is good.
Note:I had to remove the menu box height to show what i mean.
https://image.ibb.co/eTgfav/nesting_on_one_page.jpg

but when a sub-nesting/child categories have too many sub-nesting/child (about 50) that gets chopped on 2 or more pages then the tree of the categories then the tree bugs.
https://image.ibb.co/jjwfav/bug.jpg

This is Tab/page:2
It brakes the tree here too plus it adds the rest of the sub-nesting/child categories at the bottom of the page why? it should be at the top as its the continuing of tab/page 1 of the categories.

https://image.ibb.co/hDiUJF/page_2.jpg

This bugs also affects Woocommerce products categories as we sometimes need many sub products categories.

i 1st found this bug when doing a menu with Woocommerce products categories i opened a bug report here:
https://github.com/woocommerce/woocommerce/issues/13040

here or some screen shots of that bug ticket.

woocommerce Product Categories tree.jpg:

https://image.ibb.co/hNZmyF/6db82992_e7fd_11e6_8090_5631505dd16d.jpg

https://image.ibb.co/ckkFsa/762fb7fc_e7fd_11e6_81a2_7e00aa1b8432.jpg

https://image.ibb.co/fyVFsa/a496612c_e7fd_11e6_8c69_028e8ea6891d.jpg

After talking with some Woocommerce devs they told me this was a WP core bug.

i note "It looks like the problem has to do with the nesting / child categories. The second page starts with the categories that are top-level and their children. Then at the end it has the miscellaneous categories whose parents are on page 1."

" But it's not something we should be fixing as it's generated and rendered by WP core (all hierarchical categories output in the same way). We don't control that code."

"If that's broken because of WP core's handling (looks like it is), yeah I think we should raise it."

So this is why i am opening this ticket with WP.
BUG:

How to replicate this bug with WP.
create a root Categorie with 2 or more Parent Categories in it.
then add say 50 subcategories in a parent so on the create menu page the category menu box splits the subcategories on a second page. Note: it needs to split the subcategories. if the subcategories fits on one page it will not work)

EXP:

root cat 1
root cat 2
root cat 3
          - Parent Lv 1
          -- Parent lv 2
          ---  Parent lv 3 - category 01
          --- (ADD 50 other category in this parent)

Change History (9)

#1 @raykaii
3 years ago

the devs mikejolley and justinshreve from woocommerce might be able to explain this bug better.

see https://github.com/woocommerce/woocommerce/issues/13040

#2 follow-up: @welcher
3 years ago

  • Keywords reporter-feedback added

@raykaii thanks for reporting and adding the detailed information/screenshots!

Just to confirm, you are able to reproduce this using native WordPress core features correct?

#3 in reply to: ↑ 2 @raykaii
3 years ago

Yes i can reproduce this using native WordPress core. :) hope it gets fixed.

Replying to welcher:

@raykaii thanks for reporting and adding the detailed information/screenshots!

Just to confirm, you are able to reproduce this using native WordPress core features correct?

Last edited 3 years ago by raykaii (previous) (diff)

#4 @mikejolley
3 years ago

To replicate with WP categories, add > 50 top level categories to trigger pagination on the menus screen.

Then give the term a few up from the bottom of page 1 several children.

Nesting is lost/terms are ordered wrongly.

Gets even weirder when lots of top level categories have children.

#5 @raykaii
3 years ago

Any news when this could get a fix ?

mikejolley dev from woocommerce can confirm this bug.

#6 @SergeyBiryukov
3 years ago

#41354 was marked as a duplicate.

#7 @SergeyBiryukov
3 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @raykaii, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #18282 and #19837.

The first ticket has a plugin to work around the issue until it's fixed: comment:25:ticket:18282.

#8 follow-up: @raykaii
3 years ago

nvm lol I already commented here...

Last edited 3 years ago by raykaii (previous) (diff)

#9 in reply to: ↑ 8 @raykaii
3 years ago

remove this post.

Last edited 3 years ago by raykaii (previous) (diff)
Note: See TracTickets for help on using tickets.