Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#20514 closed defect (bug) (fixed)

Preview Installable Theme - navigating within preview causes default theme to be displayed

Reported by: tomauger's profile TomAuger Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: minor Version: 3.4
Component: Themes Keywords: needs-patch
Focuses: Cc:

Description

Unlike when you're working within the installed Theme Customizer / Preview, when you're previewing a theme on the Install New Themes page, if you click on any link (eg: "Home") within the previewed theme, the theme being previewed turns into Twenty Eleven.

Steps to reproduce:

  1. Navigate to Install Themes
  2. Set up some search criteria and generate the list of themes
  3. Click a theme to open it in the Previewer
  4. In the theme preview, click "Home" or navigate to another page within the theme
  5. The theme changes and no longer displays the theme you were trying to preview.
  6. Pressing your browser's back button will bring back the theme you were trying to preview.

Tested in: FF 11.0

If this is expected behaviour, or if it's really difficult to fix, I would recommend using jQuery or a Regex to disable all links within the previewed theme, as that would be preferable to having the theme switch out on you.

Change History (5)

#1 @duck_
13 years ago

  • Keywords needs-patch added
  • Summary changed from 3.4 Preview Theme - navigating within preview causes default theme to be displayed to Preview Installable Theme - navigating within preview causes default theme to be displayed
  • Version changed from 3.4 to 3.0

This bug isn't 3.4 only, but existed with the thickbox preview too. I've only confirmed as far back as 3.0, but I assume it's been there since the preview was introduced (whenever that was).

#2 @nacin
13 years ago

  • Milestone changed from Awaiting Review to 3.4
  • Owner set to nacin
  • Status changed from new to reviewing
  • Version changed from 3.0 to 3.4

I think this is a wp-themes.com bug, caused by the nginx migration. Will investigate.

#3 @ocean90
13 years ago

It's a bit random. Sometimes it works, then I get Twenty Eleven and then sometimes I get another unrelated theme.

#4 @SergeyBiryukov
13 years ago

Yeah, seems like a wp-themes.com bug. Opening http://wp-themes.com/twentyeleven/ and navigating through links results in some random theme being applied from time to time.

#5 @nacin
13 years ago

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

In certain browsers (Chrome, specifically), the cookie was getting clobbered (in certain situations). This would cause either a random theme to be chosen, or the first theme to be chosen off disk (which may have been different on different web servers). (Not sure which way it worked; I killed off the ancient PHP code and rewrote it to use the new WP_Theme APIs.)

Either way, it will now always default to Twenty Eleven on the homepage, and the cookie will no longer be clobbered.

Example workflow:

  1. http://wp-themes.com/ - uses Twenty Eleven
  2. http://wp-themes.com/vigilance/ - uses Vigilance
  3. http://wp-themes.com/ - uses Vigilance
Note: See TracTickets for help on using tickets.