Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#43657 closed defect (bug) (fixed)

Custom HTML widget editor content not updating after save

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

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 8 years ago.
Check for length of control.currentErrorAnnotations
43657.2.diff (1.0 KB ) - added by desrosj 8 years ago.

Download all attachments as: .zip

Change History (12)

@barryceelen
8 years ago

Check for length of control.currentErrorAnnotations

#1 @barryceelen
8 years ago

  • Keywords has-patch added

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


8 years ago

#4 @pento
8 years ago

  • Milestone 4.9.95.0.1
  • Version trunk4.9

#5 @pento
8 years ago

  • Milestone 5.0.15.0.2

#6 @pento
8 years ago

  • Milestone 5.0.25.0.3

#7 @desrosj
8 years ago

  • Milestone 5.0.35.1

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

#8 @desrosj
8 years ago

  • Owner set to desrosj
  • Status newassigned

@desrosj
8 years ago

#9 @desrosj
8 years ago

43657.2.diff is a refresh against trunk.

#10 @desrosj
8 years ago

  • Resolutionfixed
  • Status assignedclosed

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.