Skip to content

Adding remove_theme_support( 'block-templates' ) for site with existing user created template causes error #63822

Open
@andreawetzel

Description

Description

Removing theme support for block templates on a site that has a pre-existing template added by a user results in a white screen error on the front end.

Step-by-step reproduction instructions

  1. Add a new template (either from "Create new template" command in the Page Editor or in the Site Editor > Templates > "Add New Template")

  2. In twentytwentyfour/functions.php add the following lines from curating the editor experience documentation:

function example_theme_support() {
    remove_theme_support( 'block-templates' );
}
add_action( 'after_setup_theme', 'example_theme_support' );
  1. Reload the website home page and see a white screen.

Screenshots, screen recording, code snippet

No response

Environment info

WP 6.6
no Gutenberg plugin
Twenty Twentyfour theme
Chrome
Mac

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions