Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34310 closed enhancement (invalid)

Widget ID attributes not unique

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

Description

Hi,

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?

Thanks,

Harry

Change History (4)

#1 @swissspidy
11 years ago

  • Keywords reporter-feedback added
  • Summary W3C validator possible changes → 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
11 years ago

  • Component General → Widgets

#3 @afercia
11 years ago

  • Keywords close added

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

#4 @swissspidy
11 years ago

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