WordPress.org

Make WordPress Core

#43657 closed defect (bug) (fixed)

Custom HTML widget editor content not updating after save

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

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

Download all attachments as: .zip

Change History (12)

@barryceelen
19 months ago

Check for length of control.currentErrorAnnotations

#1 @barryceelen
19 months ago

  • Keywords has-patch added

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


14 months ago

#4 @pento
13 months ago

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

#5 @pento
11 months ago

  • Milestone changed from 5.0.1 to 5.0.2

#6 @pento
11 months ago

  • Milestone changed from 5.0.2 to 5.0.3

#7 @desrosj
10 months 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 @desrosj
10 months ago

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

@desrosj
10 months ago

#9 @desrosj
10 months ago

43657.2.diff is a refresh against trunk.

#10 @desrosj
10 months 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.