Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#9315 closed defect (bug) (invalid)

theme previewer shows current theme instead of previewed theme

Reported by: gregglind's profile gregg.lind Owned by:
Milestone: Priority: low
Severity: minor Version: 2.7.1
Component: Themes Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

When previewing a theme, my installation always shows the current theme.

The displayed url for the preview is something like:

http://mysite.com/?preview=1&template=classic&stylesheet=classic&TB_iframe=true&width=753&height=430

When I change it to use 'siteurl' instead of 'home'

http://mysite.com/wp/?preview=1&template=classic&stylesheet=classic&TB_iframe=true&width=753&height=430

things behave properly.

Thus, for my installation, theme previewer has unexpected behaviour when 'siteurl' and 'home' are different.

Patch attached, affects back to at least 2.7. (if there is another cause to explore, such at .htaccess / mod_rewrite, I hope to be enlightened)

Attachments (1)

themes-preview.patch (851 bytes) - added by gregg.lind 16 years ago.
simple patch to change 'home' to 'siteurl'

Download all attachments as: .zip

Change History (11)

@gregg.lind
16 years ago

simple patch to change 'home' to 'siteurl'

#1 @gregg.lind
16 years ago

  • Cc gregg.lind added

#2 @Denis-de-Bernardy
16 years ago

  • Keywords has-patch 2nd-opinion added; theme removed
  • Milestone changed from Unassigned to 2.8

the odd thing is that it *should* work with the home option imo.

#3 @DD32
16 years ago

No reason why it shouldnt work with the home optoion.

Are you running any caching plugins? Or server-side caching?

#4 @Boriel
16 years ago

  • Version changed from 2.8 to 2.7.1

I can reproduce it on 2.7.1 setting the WP_LANG in config.php to other locale (e.g. es_ES). If you set WP_LANG = "", then it works ok. Maybe this can put you on track...

#5 @DD32
16 years ago

  • Component changed from Administration to Themes
  • Owner anonymous deleted

I can reproduce it on 2.7.1 setting the WP_LANG in config.php to other locale (e.g. es_ES). If you set WP_LANG = "", then it works ok.

You're not using any other Translation plugins are you? Say something which allows the user to select the language?

Thanks for the extra info, I'll see if I can reproduce it later.

#6 @Denis-de-Bernardy
16 years ago

confirmed in current trunk with/without setting the language. to reproduce:

  • stick wp into /wp/
  • stick an index.php and .htaccess file into /
  • set home, siteurl, and rewrite rules accordingly

two things happen:

  • current theme gets displayed no matter what
  • blog's front page gets displayed (even if you set a static front page)

#7 @Denis-de-Bernardy
16 years ago

site note: logging out, and then back in, made the previewed theme show work. but it's still showing the blog.

#8 @Denis-de-Bernardy
16 years ago

Tracked the blog issue down to the query parser. It's assuming a singular query, and resumes to defaulting to is_home as a result.

It's not much of a big deal imo.

I can no longer reproduce after having refreshed the admin cookies by logging in and out.

Suggesting invalid if no-one else can reproduce.

#9 @Denis-de-Bernardy
16 years ago

  • Priority changed from normal to low
  • Severity changed from normal to minor

#10 @Denis-de-Bernardy
16 years ago

  • Milestone 2.8 deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.