Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#41361 closed defect (bug) (fixed)

Text widget can raise JS error if customize-base is enqueued on widgets admin screen

Reported by: westonruter's profile westonruter Owned by: westonruter's profile westonruter
Milestone: 4.8.1 Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

The Text widget is currently looking for wp.customize before attempting to interact with wp.customize.state. However, the state object is only present in the Customizer app when customize-controls is enqueued. If customize-base alone is enqueued, the wp.customize object will exist but the wp.customize.state object will not. This results in an error when the Text widget's triggerChangeIfDirty logic runs.

Attachments (1)

41361.0.diff (744 bytes) - added by westonruter 7 years ago.

Download all attachments as: .zip

Change History (5)

@westonruter
7 years ago

#1 @westonruter
7 years ago

  • Keywords has-patch commit added
  • Owner set to westonruter
  • Status changed from new to accepted

#2 @westonruter
7 years ago

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

In 41088:

Widgets: Check for existence of wp.customize.state before attempting to access in Text widget.

Amends [40631].
See #35243.
Fixes #41361 for trunk.

#3 @westonruter
7 years ago

  • Keywords fixed-major added

#4 @westonruter
7 years ago

In 41089:

Widgets: Check for existence of wp.customize.state before attempting to access in Text widget.

Merges [41088] onto 4.8 branch.
Amends [40631].
See #35243.
Fixes #41361 for 4.8.1.

Note: See TracTickets for help on using tickets.