Closed Sandstromer closed 3 years ago
@paaljoachim would you also consider tagging with the [Priority]High and [Type]Bug labels?
Hi @Sandstromer
I will instead ping folks who work with Full Site Editing so that they are alerted to this issue: @jameskoster @Addison-Stavlo @aristath
I also added the Needs testing label so full site editing developers can take a look.
Thank you for the explanation @paaljoachim I'm new to this so it definitely helps and is much appreciated.
Thank you for finding this bug and reporting it here! Have a great continued weekend!
I can confirm that I am able to reproduce this.
Confirming that I can replicate this as well.
Highlighting this because I think this must be solved for the MVP @mtias @david-szabo97
That is super funky! I can repro as well:
cc @youknowriad @jeyip to add to the list of pings for folks that may have ideas.
Expanding on what I can repro above. It looks like those template parts always have the expected ID in the editor active-theme//tp-slug
. But in step 2 it is saving to theme-A//header
instead of theme-B//header
(even though the block has this ID and save panel sees this as the entity being dirty), so it saves to theme-A and thus theme-B is still dirty and the save looks like it didnt take.
I think I found the problem. More explanation on https://github.com/WordPress/gutenberg/pull/29842 - but it seems there are a few things going on making this flow problematic.
should be fixed now with https://github.com/WordPress/gutenberg/pull/29842
Description
In the Site Editor, when editing a template or a template part, unable to save if template or template part already exists as a previously edited template from another theme.
Step-by-step reproduction instructions
Install more than one FSE enabled theme e.g. TT1 Blocks and Q Activate either theme. Go to Site Editor and make changes to a template part (e.g. header) or a template (e.g. index), save changes by clicking Update Design. Exit the Site Editor, go to Appearance > Themes and switch themes to the other FSE theme. Go back into Site Editor and make changes to a template e.g. if you previously edited header in TT1 Blocks theme, then edit the header in Q theme. Click Update Design to save and the button should change state to disabled to signify that the changes have been saved. Notice the button stays active. Exit the Site Editor and notice the 'This page is asking you to confirm that you want to leave - data you have entered may not be saved.' message. Click 'Leave Page' to exit the Site Editor. View the live site and notice how the edited template has not changed. Go to Appearance > Themes and switch back to TT1 Blocks theme, view the live site and notice how the template has now changed to the template that we were trying to edit when the Q theme was active.
Expected behaviour
The template or template part should only save for the active theme, not another theme with the same previously edited template name.
Actual behaviour
The template or template part is saved for the wrong theme.
Screenshots or screen recording (optional)
Code snippet (optional)
WordPress information
Device information