Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 5 months ago

#7696 closed defect (bug) (wontfix)

Widget markup should not have hardcoded `id` param

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Core Keywords: good-first-bug needs-patch
Cc:

Description

I've just noticed that at least one of our widget classes has hardcoded id attributes in the markup generated by widget(). This shouldn't happen. We should use $this->id to concatenate id attributes, in case someone wants to have more than one instance on a page. See eg https://buddypress.trac.wordpress.org/browser/tags/2.9.3/src/bp-groups/classes/class-bp-groups-widget.php?marks=120,130#L118 The rest of our widgets could use an audit for this.

We can minimize backward compatibility breaks by keeping the currently hardcoded IDs for the first instance on a page.

Our JS may also need a review for this - I'm not sure whether it references widget IDs or classes, but it should only use selectors.

Change History (1)

#1 @imath
5 months ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Widgets were moved into BP Classic after being deprecated in favor of blocks.

Note: See TracTickets for help on using tickets.