Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40018 closed defect (bug) (fixed)

Customize: Selective refresh always falls back to full refreshes when customizing the 404 template

Reported by: westonruter's profile westonruter Owned by: westonruter's profile westonruter
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.5
Component: Customize Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

When a partial refresh request is made, if the response has an error code the partial will invoke its fall back behavior, normally resulting in a full refresh. A 404 status is considered an error code by the selective refresh JS, and so this means that attempting selective refresh on the 404 template will currently always result in the fallback behavior ensuing.

Attachments (1)

40018.diff (907 bytes) - added by westonruter 8 years ago.

Download all attachments as: .zip

Change History (8)

@westonruter
8 years ago

#1 @westonruter
8 years ago

  • Keywords has-patch added

The fix is simply to override any existing HTTP status with 200 in the handler for partial refresh requests. See 40018.diff.

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


8 years ago

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


8 years ago

#4 @swissspidy
8 years ago

  • Keywords commit added
  • Owner set to westonruter
  • Status changed from new to assigned

#5 @westonruter
8 years ago

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

In 40316:

Customize: Fix selective refresh when customizing the 404 template.

Overrides the 404 status during partial refresh requests to serve back 200 so that the request is not deemed a failure and invoke the fallback behavior (full refresh).

See #27355.
Fixes #40018.

#6 @westonruter
8 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for consideration in 4.7.4

#7 @swissspidy
8 years ago

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

In 40366:

Customize: Fix selective refresh when customizing the 404 template.

Overrides the 404 status during partial refresh requests to serve back 200 so that the request is not deemed a failure and invoke the fallback behavior (full refresh).

See #27355.
Fixes #40018.

Merges [40316] to the 4.7 branch.

Note: See TracTickets for help on using tickets.