Site editor duplicates templates/template-parts on editing them #43
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Copied from https://github.com/WordPress/gutenberg/issues/50816. I'm posting this here because I've only experienced this bug on wordpress sites running on co-op cloud (specifically, aadils.computer and autonomic.zone). When I imported the same site into Local, the issue disappeared. It seems to happen independent of what version of WordPress/Gutenberg I'm running.
Description
I've been experiencing this bug for a long time (I think since 6.0?) where editing any template or template part in the site editor causes WordPress to create a new template/template-part of the same name instead of updating the existing one.
This new template (or template-part), containing all modifications, is created under the current WordPress user, and the default one which is actually being used by theme is cleared of all customizations and is what shows up on the front-end.
(See screen recording for context)
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Video of me breaking the site with a simple edit to the home template:
gutenberg-template-editing-bug.webm
Video of me restoring the home template:
Kooha-2023-05-20-19-04-56.webm