Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#12244 closed defect (bug) (fixed)

Taxonomy Checkboxes sync to any checkbox array on the edit form

Reported by: kevinB Owned by: azaozz
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: JavaScript Keywords: taxonomy, category, post
Focuses: Cc:


(see #12242 for corresponding WP 2.9 patch)

The javascript which syncs "All" and "Most Used" category checkboxes was rewritten for WP 2.9. The new JQuery code binds to the click event of every checkbox on the form, and synchronizes the category checkboxes with matching value attribute.

In the default configuration it works fine. But if a plugin adds another checkbox array to the form, these checkboxes also become a sync source for the category checkboxes. Category checkboxes are (un)checked when the plugin checkbox is clicked.

This occurs only with plugin-defined checkbox arrays, and only for checkboxes whose values attribute matches a category ID. So there is a limited incidence, but potentially significant severity. The error would presumably also occur with custom taxonomy checkboxes.

To reproduce:

  • Edit or Add New Post
  • In the Readers metabox, toggle the checkbox of a Group or User whose ID value matches any Category ID (Firebug is helpful here).

Attachments (1)

sync-popular-term-jquery_3.0.patch (660 bytes) - added by kevinB 6 years ago.
JQuery to sync "All" terms and "Most Used" terms checkboxes

Download all attachments as: .zip

Change History (2)

6 years ago

JQuery to sync "All" terms and "Most Used" terms checkboxes

#1 @azaozz
6 years ago

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

(In [13195]) Sync checkboxes only for categories, some white space cleanup, props kevinB, fixes #12244

Note: See TracTickets for help on using tickets.