Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#43657 closed defect (bug) (fixed)

Custom HTML widget editor content not updating after save

Reported by: barryceelen's profile barryceelen Owned by: desrosj's profile desrosj
Milestone: 5.1 Priority: normal
Severity: normal Version: 4.9
Component: Widgets Keywords: has-patch commit
Focuses: javascript, administration Cc:

Description

When updating the Custom HTML widget content on save the updateFields() function checks if 0 !== control.currentErrorAnnotations. This fails as control.currentErrorAnnotations is an array.

Attachments (2)

43657.diff (1.0 KB) - added by barryceelen 7 years ago.
Check for length of control.currentErrorAnnotations
43657.2.diff (1.0 KB) - added by desrosj 6 years ago.

Download all attachments as: .zip

Change History (12)

@barryceelen
7 years ago

Check for length of control.currentErrorAnnotations

#1 @barryceelen
7 years ago

  • Keywords has-patch added

#2 @westonruterCore Committer
7 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.9.9

This ticket was mentioned in Slack in #core by whitneyyadrich. View the logs.


7 years ago

#4 @pentoCore Committer
6 years ago

  • Milestone changed from 4.9.9 to 5.0.1
  • Version changed from trunk to 4.9

#5 @pentoCore Committer
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#6 @pentoCore Committer
6 years ago

  • Milestone changed from 5.0.2 to 5.0.3

#7 @desrosjCore Committer
6 years ago

  • Milestone changed from 5.0.3 to 5.1

Let's get this into 5.1 as it falls outside of the 5.0.3 scope.

#8 @desrosjCore Committer
6 years ago

  • Owner set to desrosj
  • Status changed from new to assigned

@desrosjCore Committer
6 years ago

#9 @desrosjCore Committer
6 years ago

43657.2.diff is a refresh against trunk.

#10 @desrosjCore Committer
6 years ago

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

In 44474:

Widgets: Fix custom HTML widget editor content not updating after save.

An integer comparison is performed against control.currentErrorAnnotations, but control.currentErrorAnnotations is actually an array. This fixes that comparison so the content saves correctly.

Props barryceelen.
Fixes #43657.

Note: See TracTickets for help on using tickets.