Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#17936 closed defect (bug) (fixed)

Prevent accidental multiple click when creating new categories

Reported by: mdawaffe Owned by: westi
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.2
Component: Administration Keywords: has-patch commit
Focuses: Cc:


It is possible to click the "Add New Category" button multiple times when creating a new category from the new post screen.

In certain cases, the extra clicks can cause (mostly harmless) fatal errors because of a race condition in _wp_ajax_add_hierarchical_term().

Attached disables the button via JS after the first click and re-enables it after the AJAX request completes (successfully or not).

Attachments (1)

17936.diff (736 bytes) - added by mdawaffe 4 years ago.

Download all attachments as: .zip

Change History (7)

@mdawaffe4 years ago

comment:1 @westi4 years ago

  • Owner set to westi
  • Status changed from new to accepted

comment:2 @ryan3 years ago

  • Milestone changed from Awaiting Review to 3.4

comment:3 @nacin3 years ago

Looks good.

comment:4 @mp3j3rk3 years ago

I'm new, but patch looks good to me as well.

Using WordPress 3.3.1 stable

Version 0, edited 3 years ago by mp3j3rk (next)

comment:5 @nacin3 years ago

  • Keywords commit added

comment:6 @ryan3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.