Opened 9 years ago
Closed 9 years ago
#37901 closed defect (bug) (fixed)
Multisite admin has duplicate HTML id's for ab-awaiting-mod
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Toolbar | Keywords: | good-first-bug has-patch |
Focuses: | administration, multisite | Cc: |
Description
In a multisite installation, the admin bar contains duplicate HTML element id attribute's for span elements with id="ab-awaiting-mod". Fails HTML validation.
This is associated with site items in the My Sites menu and the Manage Comments sub-menu item on each site.
The problem is located in the file wp-includes/admin-bar.php within the function wp_admin_bar_comments_menu() on line 699 where a span element is assigned the same id attribute, "ab-waiting-mod", for each site in the multisite's My Sites menu.
HTML id attributes must be unique for a page, so either this id is made unique for each site in the My Sites menu (append the site ID or similar) or the id is removed (to me it appears that the id may not be of any use since it doesn't occur anywhere else in the wordpress core).
Attachments (1)
Change History (11)
#2
@
9 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 4.7
#4
follow-up:
↓ 5
@
9 years ago
Hmm, I could not reproduce the original issue though.
wp_admin_bar_comments_menu() is only used in the main toolbar, not in "My Sites" menu.
The Manage Comments item in wp_admin_bar_my_sites_menu()
does not have a duplicate ID.
#5
in reply to:
↑ 4
@
9 years ago
Replying to SergeyBiryukov:
Hmm, I could not reproduce the original issue though.
wp_admin_bar_comments_menu() is only used in the main toolbar, not in "My Sites" menu.
The Manage Comments item in
wp_admin_bar_my_sites_menu()
does not have a duplicate ID.
My mistake - on further investigation I have found that the problem is not in the core function wp_admin_bar_my_sites_menu()
. I've tracked to problem to a plugin called multisite-enhancements
.
#7
@
9 years ago
I still think we can safely delete this id.
it doesn't occur anywhere else in the wordpress core
#8
@
9 years ago
I found a handful of plugins and themes that relied on #ab-awaiting-mod
to apply custom styles to the admin menu, but it seems that none have been updated since before the changes in [19516].
Introduced in [15671] as
awaiting-mod
, changed toab-awaiting-mod
in [16310], unused since [19516].I think it's safe to remove it.