Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#34310 closed enhancement (invalid)

Widget ID attributes not unique

Reported by: harrysoup's profile harrysoup Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3.1
Component: Widgets Keywords:
Focuses: Cc:



In looking to validate one of my sites lately I have seen a number of things that might need to be tweaked to try and prevent them failing or producing errors.

The main one I have noticed for now is the amount of duplicate ID's that get created - in this particular case the widget function in default-widgets.php I have had to use unset($argswidget_id?); which is not ideal at all, to get round this issue, is there anything we could do to get a patch for this in the future?



Change History (4)

#1 @swissspidy
8 years ago

  • Keywords reporter-feedback added
  • Summary changed from W3C validator possible changes to Widget ID attributes not unique

Widget IDs are usually unique and numbered in ascending order. So if you use the recent posts widget twice you'll get recent-posts-1 and recent-posts-2.

Can you tell us which IDs where not unique? Also try to disable all plugins and switch to one of the default themes to see if it goes away.

#2 @swissspidy
8 years ago

  • Component changed from General to Widgets

#3 @afercia
8 years ago

  • Keywords close added

As far as I can tell, core outputs unique IDs for widgets. Maybe close?

#4 @swissspidy
8 years ago

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