Skip to content

Wrong template displayed for hybrid themes in the post template editor #64341

@jffng

Description

@jffng

Description

The post template editor shows the wrong template for hybrid themes that contain a mix of block and php templates.

Step-by-step reproduction instructions

  1. Activate a classic theme that has a single.php or page.php (e.g. twentytwentyone)
  2. Add a templates/index.html file.
  3. Go to add / edit a post or page.
  4. Verify the template editor renders the index.html, instead of single.php.
  5. Verify the front-end renders the single.php.

Screenshots, screen recording, code snippet

Kapture.2024-08-07.at.11.11.50.mp4

Environment info

  • WP 6.6.1 with Twenty Twenty-One

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Template Editing ModeRelated to the template editor available in the Block Editor[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Priority] HighUsed to indicate top priority items that need quick attention[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Status

    🦵 Punted to 6.9

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions