[wp-trac] [WordPress Trac] #56926: Infinite loop in wp_nav_menu

WordPress Trac noreply at wordpress.org
Fri Nov 18 20:08:56 UTC 2022


#56926: Infinite loop in wp_nav_menu
-------------------------------------------------+-------------------------
 Reporter:  david.binda                          |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1.2
Component:  Menus                                |     Version:  6.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  refresh                                        |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * keywords:  reporter-feedback has-patch has-unit-tests needs-refresh =>
     has-patch has-unit-tests needs-refresh


Comment:

 Replying to [comment:21 david.binda]:
 > I've been finally successful in my attempts to reproduce the issue in
 customizer

 Yes, can reproduce it now too, and yes, very complex steps. The video was
 very helpful. Good job!

 The error seems to be coming from the accessibility improvements there,
 and seems to only happen when attempting to move a sub-menu item to a top
 menu position by clicking the left arrow.

 Tried to reproduce it when moving a deeper (sub-sub-menu) item one
 position up, but couldn't. There were also couple of notices thrown:
 `Undefined offset: 1128 in /wp-includes/nav-menu-template.php on line 211`
 and line 214: https://core.trac.wordpress.org/browser/tags/6.1.1/src/wp-
 includes/nav-menu-template.php#L211 (1128 is the ID of the removed menu
 item, see step 4 above).

 Thinking that this ticket should be closed with the
 [https://core.trac.wordpress.org/ticket/56926?replyto=21#comment:20 fix
 for the infinite loop] as described by @peterwilsoncc above. Then two new
 tickets can be opened: one to verify `menu_item_parent` on saving, and
 remove it if it matches the menu ID. Would be good it this is added to
 6.1.2 if possible. Then another ticket to fix the bug in the Customizer.
 After a quick look this doesn't seem straightforward and may take some
 time.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56926#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list