Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#9451 closed defect (bug) (wontfix)

Calendar widget can sprout a page with multiple, identical ID

Reported by: Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Widgets Keywords: has-patch tested commit
Focuses: Cc:


There is a div id="calendar_wrap in the calendar widget. It can end up outputting multiple widgets with the same IDs on the page.

Is it needed for any reason?

Attachments (1)

9451.diff (631 bytes) - added by Denis-de-Bernardy 7 years ago.

Download all attachments as: .zip

Change History (16)

#1 @hakre
7 years ago

using <div class="calendar_wrap" ... and a small mod of a themes (the default themes?) css should fix this.

is it only for the calendar widget? or are other widgets having the same problem?

#2 @Denis-de-Bernardy
7 years ago

only the calendar.

#3 @Denis-de-Bernardy
7 years ago

  • Keywords has-patch tested added; needs-patch 2nd-opinion removed

#4 follow-up: @azaozz
7 years ago

This would probably break all themes that have styling for the calendar. There's no point of having two calendars on the same page anyways as they will look the same (only the title can be set in the widget).

#5 in reply to: ↑ 4 @Denis-de-Bernardy
7 years ago

Replying to azaozz:

TThere's no point of having two calendars on the same page anyways

Agreed 100%. But I didn't suggest the code that made calendars a multi-widget. And as a result users and bound to use it. Maybe we should roll that back instead? ;-)

#6 @DD32
7 years ago

See also: #9503 (new defect (bug)) Multi-calendar can result in multiple versions of the #wp-calendar ID

#7 @DD32
7 years ago

Er, Only now i notice that it refers to different ID's.. Still I think it might be best to keep it to the single ticket.

#8 @hakre
6 years ago

The new Multiwidget class should handle this properly and preventing mutliple identical IDs.

#9 @Denis-de-Bernardy
6 years ago

it doesn't... and this one will still be needed:


Else we'll have validation fascists who will be all over trac to report the issue.

#10 @hakre
6 years ago

eh calm down using that language. I can not take care for everything. This one is on my list. I would really love to see a more wise class usage that IDing everything.

#11 @Denis-de-Bernardy
6 years ago

oh, no worries, I wasn't meaning you or others in trac, I was meaning end-users in forums. :)

Andrew's note is quite valid though. It's rare that more than one calendar will get included anyway, and changing this may break quite a few things in practice -- especially in older themes.

#12 @hakre
6 years ago

Well an uplift of a major version is a chance to break something :D

#13 @Denis-de-Bernardy
6 years ago

  • Keywords commit added

9503.diff is broken. 9451.diff still works fine. commit the latter (in which case I'll redo the other one), or wontfix?

#14 @Denis-de-Bernardy
6 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

based on andrew's remark

#15 @Denis-de-Bernardy
6 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.