[wp-trac] [WordPress Trac] #39175: Customizer assumes url is passed with replaceState and pushState
WordPress Trac
noreply at wordpress.org
Thu Dec 8 02:17:41 UTC 2016
#39175: Customizer assumes url is passed with replaceState and pushState
----------------------------------------+-----------------------------
Reporter: Christian1012 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: javascript, administration |
----------------------------------------+-----------------------------
According to the w3 spec on pushState and replaceState, the third argument
`url` is optional.
In customize-preview.js, `injectUrlWithState( url )` assumes `url` is set,
and may append query strings to an undefined `url`. If the javascript on
the page uses `replaceState` without passing in the optional third `url`
paramenter, this results in preview urls like:
`https://example.com/undefined?customize_changeset_uuid=de92e920-e85f-41c3
-ab0a-ed6713655aee`.
When provided an url like this, the end result will be the customizer
preview displaying a 404 page. Unless, I assume, you have a page with the
slug "undefined" or "null".
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39175>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list