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-templates' theme support breaks the site editor on classic themes #46054

Closed
abaicus opened this issue Nov 25, 2022 · 2 comments
Closed

Comments

@abaicus
Copy link
Contributor

abaicus commented Nov 25, 2022

Description

Since 6.1.1 core version, adding the block-templates theme support to a classic theme causes the site editor page to load as empty.

Step-by-step reproduction instructions

  1. Activate any classic theme (I tried on twentytwenty and a bunch of other themes);
  2. Add the following code in the functions.php file:
add_action( 'after_setup_theme', function() {
    add_theme_support( 'block-templates' );
} );
  1. Add a templates folder inside the root folder of the theme;
  2. Add a index.html file inside of the templates folder with any content - I used the following:
<!-- wp:heading {"textAlign":"center","level":1,"fontSize":"xxl"} -->
<h1 class="has-text-align-center has-xxl-font-size">Our awesome blog</h1>
<!-- /wp:heading -->
  1. Go to wp-admin/site-editor.php on the website;
  2. The site editor will load a blank page, and there are no errors in the console;

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress core 6.1.1 - it used to work with 6.1.0;
  • The same thing happens with Gutenberg installed;
  • Happens both in Chrome and Firefox;
  • I am on macOS 13.0.1 Ventura;

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

@Mamaduka
Copy link
Member

I believe this is the same issue as described in #45862.

@abaicus
Copy link
Contributor Author

abaicus commented Nov 25, 2022

Indeed, @Mamaduka! Thanks for pointing it out. I will close this one as it seems a PR has already been made there 👍🏻

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants