Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block Theme Previews: Live preview displays the active theme instead of the chosen theme #52309

Closed
franzaurus opened this issue Jul 5, 2023 · 11 comments
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended

Comments

@franzaurus
Copy link

franzaurus commented Jul 5, 2023

Description

In WordPress 6.3 beta3, when I do live preview for a selected block theme, the Site Editor displays the active theme instead of the chosen theme.

Step-by-step reproduction instructions

  1. Activate TT2 or any other block theme
  2. Under Appearance > Themes, click to live preview the TT3 theme
  3. Notice that the Site Editor shows you the preview of the active TT2 theme instead of TT3

Screenshots, screen recording, code snippet

Active TT2, live previewing TT3

beta3-live-preview

Environment info

Localwp 7.02+6395
WordPress: 6.3-beta3
PHP: 8.1.9
Server: nginx/1.16.0
Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.9)
Browser: Chrome 114.0.0.0 (Windows 10/11)
Theme: Twenty Twenty-Three 1.1
MU-Plugins: None activated
Plugins:
    WordPress Beta Tester 3.5.0
    WordPress Importer 0.8.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan carolinan added the Needs Testing Needs further testing to be confirmed. label Jul 5, 2023
@jordesign
Copy link
Contributor

Thanks for the report @franzaurus !

I've tested this and can confirm I have been able to recreate this. When no page or template is selected - the existing active theme preview is shown. It is only when a specific template or page is shown that the new theme is previewed.

(Please note in this video that I had customised the TT3 theme prior to testing).

Screen.Recording.2023-07-05.at.4.46.35.pm.mov

@jordesign jordesign added [Type] Bug An existing feature does not function as intended [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed Needs Testing Needs further testing to be confirmed. labels Jul 5, 2023
@carolinan
Copy link
Contributor

I am able to reproduce this, but inconsistently. Were you able to narrow down the exact steps to getting the preview to switch to the selected theme?

@carolinan
Copy link
Contributor

Also reported in https://core.trac.wordpress.org/ticket/58712

@jomonthomaslobo1
Copy link

jomonthomaslobo1 commented Jul 5, 2023

@carolinan

Steps to reproduce:

  1. Install a block theme
  2. Select the live preview
  3. The preview shows the name correctly on the left-hand side but on the right-hand side, the theme is not previewed properly.Selecting Activate won’t change the theme.

@carolinan
Copy link
Contributor

Thank you, I meant what to click on for the preview to change to the correct theme.
@jordesign wrote " It is only when a specific template or page is shown that the new theme is previewed."

For me it is inconsistent.

Activate Twenty Twenty-Three
Go to the themes screen. Select Live Preview of any other block theme. Get redirected to the Site Editor. ✔️
The preview shows Twenty Twenty-Three.
I select Pages. The preview still shows Twenty Twenty-Three.
I select Templates. The preview still shows Twenty Twenty-Three.
Now I select Styles and to my surprise it shows the styles and the preview of the correct theme.
I go back to the templates and it shows the correct theme.
Now I go to the Theme screen again and select Live Preview of a third installed block theme.
This time I don't have to click on anything or do anything. The preview is correct.

So I wonder if it is about timing?

@scruffian
Copy link
Contributor

Fixed here: WordPress/wordpress-develop#4795

@franzaurus
Copy link
Author

My experience is closer to @jordesign than to @carolinan. I was consistently redirected to the correct theme whenever a "page", or "template" was chosen. Although activating the selected theme would still showed the existing theme as the active one.

My testing environment via instawp

  • WordPress: 6.3-beta3
  • PHP: 8.1.20
  • Server: Apache/2.4.57 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f
  • Database: mysqli (Server: 10.6.14-MariaDB-1:10.6.14+maria~ubu2004 / Client: mysqlnd 8.1.20)
  • Browser: Chrome 114.0.0.0 (Windows 10/11)
  • Theme: Twenty Twenty-Two 1.4
  • MU-Plugins: None activated
  • Plugins: WordPress Beta Tester 3.5.0

@carolinan
Copy link
Contributor

Does this need any other Gutenberg changes than #52537?

@scruffian
Copy link
Contributor

@carolinan are you still seeing issues?

@carolinan
Copy link
Contributor

No issues, I was more wondering if this should be closed as completed.

@scruffian
Copy link
Contributor

Yes good point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended
Projects
Development

No branches or pull requests

5 participants