Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#17879 closed defect (bug) (duplicate)

Sidebar IDs conflict in "Edit Widgets" screen

Reported by: Alhadis Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Widgets Keywords:
Focuses: Cc:


Hey all,

If I register a dynamic sidebar with an ID of "footer", it overrides the ID of a matching element on the "Edit Widget" screen. Until 3.2-RC1, all I ever noticed was an ugly lack of CSS in the rollout menu (due to the fact that only one element defined by an ID will receive CSS rules.

However, now I notice the rollout menu has broken altogether in the Edit Widgets page: if I click the down arrow after having defined a sidebar with an ID of "footer" in my theme, the description suddenly appears in the page's actual footer. Even worse, it's now allowing me to drag-and-drop widgets into the element itself... (see attached)

Many theme developers (especially less experienced ones) mightn't have the insight to use a different ID for their themes. I suggest prefixing the IDs being used in the widget rollout menus with something to prevent conflict:

E.g., "footer" might become "sb_footer" or what-have-you.

Attachments (1)

screengrab.png (56.8 KB) - added by Alhadis 4 years ago.
Text widget that's been dragged into the sidebar

Download all attachments as: .zip

Change History (3)

4 years ago

Text widget that's been dragged into the sidebar

#1 @Alhadis
4 years ago

  • Summary changed from Sidebar IDs need prefixing in "Edit Widget" screen to Sidebar IDs conflict in "Edit Widgets" screen

#2 @kawauso
4 years ago

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