Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#31782 closed defect (bug) (wontfix)

Customizer: Use proper preview URL for Live Preview links

Reported by: mattwiebe's profile mattwiebe Owned by: ocean90's profile ocean90
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Customize Keywords: needs-patch
Focuses: javascript Cc:

Description

You're doing more work then is needed, since the theme object already has the theme.actions.customize URL built in. Also, it breaks on WordPress.com since our themes are in subdirectories. Using theme.actions.customize is how wp-admin/themes.php does it.

Attachments (1)

31782.diff (661 bytes) - added by mattwiebe 9 years ago.

Download all attachments as: .zip

Change History (11)

@mattwiebe
9 years ago

#1 @mattwiebe
9 years ago

  • Keywords has-patch added

#2 @westonruter
9 years ago

  • Milestone changed from Awaiting Review to 4.2

#3 @DrewAPicture
9 years ago

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

#4 @westonruter
9 years ago

  • Keywords commit added
  • Owner changed from westonruter to ocean90
  • Status changed from assigned to reviewing

Good re-use of the data we're already passing to the template.

#5 @ocean90
9 years ago

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

In 31911:

Customizer: Use proper preview URL for Live Preview links.

props mattwiebe.
fixes #31782.

#6 @celloexpressions
9 years ago

  • Keywords needs-patch added; has-patch commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, totally missed this.

This was done so that we can preserve url and return URL parameters, to make the experience smoother (I changed it from using theme.actions.customize for that reason). The page you're previewing shouldn't be changed when you switch themes, which currently works if you don't navigate further in the preview and will be improved westonruter's ticket that adds history and url updating for that.

I'd suggest correcting the bug with assuming that the theme id can be used as the query arg by using either an additional available field or adding a field to wp_prepare_themes_for_js(). Unfortunately the way it currently works, we need to build the URL in PHP with the adding/removing query args, which shouldn't happen in prepare_themes_for_js.

This ticket was mentioned in Slack in #core-customize by ocean90. View the logs.


9 years ago

#8 @ocean90
9 years ago

In 31933:

Customizer: Revert [31911]. We want to preserve url and return URL parameters to make the experience smoother.

see #31782.

#9 @ocean90
9 years ago

  • Milestone 4.2 deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

#10 @westonruter
9 years ago

I think we can still preserve the URL and return parameters. We just have to amend them to the URL we get from data.theme.actions.customize.

Related: #31896

Note: See TracTickets for help on using tickets.