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

FSE template auto-drafts are not re-created when a theme is deactivated or deleted and activated again. #28054

Closed
carolinan opened this issue Jan 8, 2021 · 2 comments
Labels
[Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@carolinan
Copy link
Contributor

I ran into a problem on a website where I had Gutenberg 9.7.0, a full site editing theme and LightSpeed cache installed.

After upgrading to 9.7.0, no issues were found, but I suspect that during the night, LightSpeed cache decided to clean up the database and delete all the auto drafts. 😢 😭 🤦
(It is unclear to me why this was never an issue with 9.6+)

When I logged into the site the following day, the message: No matching template found was showing on the front.
The site editor was not loading any existing templates, nor did it let me create and save any new templates.
When viewing Appearance -> Templates and template-parts, there were no auto-drafts saved.

On to the actual reported problem and help request:
I was not able to find a way to create new auto-drafts.
I deactivated the FSE theme and activated it again, but no new drafts were created.
I deleted the theme and installed and activated it again, but no new new drafts were created.

I had to rename the theme, for it to be have like a new theme, to have the auto-drafts re-created and the theme working again.

-Is there template data with the previous theme name still stored in the database? Where, and how do I clean it?
How do I trigger the creation of auto-drafts if they have been accidently deleted?

@carolinan carolinan added the [Type] Help Request Help with setup, implementation, or "How do I?" questions. label Jan 8, 2021
@carlomanf
Copy link

carlomanf commented Jan 9, 2021

I'm aware of database cleaner plugins deleting the auto-drafts, but when that happened for me, they just got re-generated again. You shouldn't need to do anything to trigger their creation. This was with an earlier version, so perhaps there was a regression with 9.7. #27910 looks nearly ready to be merged, I wonder if it would solve your problem.

@carolinan
Copy link
Contributor Author

It happened again without the cache plugin installed. The autodrafts are missing and the front is displaying the No matching template found message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

3 participants