Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45301 closed defect (bug) (invalid)

Menu ID is missing from li element when two menu containers have the same menu set

Reported by: backups's profile BackuPs Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.0
Component: Menus Keywords: close
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Hi

I think there is a bug. When you have menu and set that same menu to two menu containers the second one does not have the menu id for the li element. It is missing

Tested with wordpress default theme 20-17 and set the same menu to the main menu and the social menu container. When done so the social menu container has no ID field on each li element. It is completely missing

See images attached

https://cl.ly/d0987448cae1

https://cl.ly/6c283d9a27c0

https://cl.ly/157163f40bb5

How to fix this?

Attachments (3)

menu-set-two-containers.png (55.4 KB) - added by SergeyBiryukov 6 years ago.
menu-li-id-missing.png (47.8 KB) - added by SergeyBiryukov 6 years ago.
main-menu.png (96.1 KB) - added by SergeyBiryukov 6 years ago.

Download all attachments as: .zip

Change History (6)

#1 @SergeyBiryukov
6 years ago

  • Description modified (diff)

#2 @SergeyBiryukov
6 years ago

  • Component changed from General to Menus
  • Keywords close added; needs-patch removed

Hi @BackuPs, welcome to WordPress Trac! Thanks for the report.

This is intentional, as duplicate ID attributes is invalid HTML. See the discussion in #13976.

#3 @matveb
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.