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

Child theme issue: Duplicate Templates and Template Parts in Site Editor #53138

Closed
bgardner opened this issue Jul 29, 2023 · 7 comments
Closed
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@bgardner
Copy link

bgardner commented Jul 29, 2023

Description

When a child theme is active and includes templates, there is a duplication issue in the Site Editor. Two instances of each template that exists in the child theme are present, with the parent template being loaded in the Site Editor (while the front end is properly using the child theme template).

Step-by-step reproduction instructions

  1. Create a child theme with templates and template parts.
  2. Activate child theme and access the Site Editor > Templates (or Template Parts) screen.

For testing purposes, I am attaching a zip file with TT3 and a sample TT3 child theme.
tt3-themes.zip

Screenshots, screen recording, code snippet

Screen.Recording.2023-07-29.at.10.56.43.AM.mov

Environment info

Problem DOES NOT exist with WP 6.2.2 and Gutenberg 16.3 active.
Problem DOES exist with WP 6.3 RC2 (with or without Gutenberg 16.3 active).

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

@bgardner
Copy link
Author

Similarly, Template Parts are also being duplicated:

Screen.Recording.2023-07-29.at.11.02.17.AM.mov

@ndiego ndiego added [Type] Bug An existing feature does not function as intended [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Regression Related to a regression in the latest release labels Jul 29, 2023
@ndiego
Copy link
Member

ndiego commented Jul 29, 2023

I have confirmed this issue and have added it to the 6.3 Board.

cc @tellthemachines @ramonjd

@oandregal
Copy link
Member

@ramonjd just tested by reverting that commit and I cannot longer reproduce the issue. So it seems to be the root cause. I'm taking a look.

This is a change in core, those functions no longer live in Gutenberg. I presume this is why it was only reported now despite being merged since more than 3 months ago 😞 I reopened the original ticket https://core.trac.wordpress.org/ticket/57756#comment:26 in case you want to follow it. I'll also report here for redundancy.

@oandregal
Copy link
Member

Prepared a fix at WordPress/wordpress-develop#4940

@bgardner
Copy link
Author

bgardner commented Jul 31, 2023

@oandregal Any chance that makes its way into RC3? IMO, this issue is a pretty big one, because it prevents ANY child theme's templates from being able to be edited via the Site Editor.

@tellthemachines
Copy link
Contributor

Closing as the fix has been committed to the release branch in https://core.trac.wordpress.org/changeset/56330. Thanks everyone!

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") [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
Development

No branches or pull requests

5 participants