Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#38573 assigned defect (bug)

Ajax requests in customizer controls don't inject customized state as done in preview

Reported by: westonruter's profile westonruter Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Customize Keywords: needs-patch
Focuses: javascript Cc:

Description

In the customizer preview, Ajax requests now get the customized state injected via jQuery.prefilter. In the customizer controls pane, however, this was not also implemented. This is important to ensure that that requests to the REST API will return back the expected previewed state.

Also relates closely to #38122.

Attachments (1)

38573.wip.diff (11.4 KB) - added by westonruter 8 years ago.

Download all attachments as: .zip

Change History (6)

#1 @westonruter
8 years ago

  • Owner set to westonruter
  • Status changed from new to accepted

#2 @westonruter
8 years ago

In 39138:

Customize: Ensure page/post stubs are included in listings and searches for available nav menu items.

Include the customized state in the Ajax requests to load items and search items.

See #38573.
Fixes #38122.

#3 @westonruter
8 years ago

  • Milestone changed from 4.7 to Future Release
  • Owner westonruter deleted
  • Status changed from accepted to assigned

I don't think this is important to address right now. It will play an important role in #37887. Otherwise, any plugins that do REST API calls can just use POST with _method=GET as shown in requests to fetch available nav menu items.

#4 @westonruter
8 years ago

  • Use URL state for Ajax requests instead of wp.customize.settings. Move to base, but then can't use existing query params?
  • Eliminate add request previewing wrapper so that underlying function can be overridden?

#5 @celloexpressions
8 years ago

Taking off of the no-replies list.

Note: See TracTickets for help on using tickets.