Full Site Editing Template Part Deleted or Unavailable
It is October 2021 and I am testing the WordPress full site editing capabilities with Gutenberg. As of this writing, this is only available via the Gutenberg plugin until WordPress 5.9 is released in a few months.
I had cloned the Theme Experiments repo directly in my test site’s theme folder. The cool thing is that WordPress will automatically traverse all subfolders to find any themes. The bad news is this may break some of the experimental themes in the repo. Here is the repo: https://github.com/WordPress/theme-experiments
Because I cloned directly in my themes folder, this is how the folder structure looked
wp-content/themes/theme-experiments/ambitious/{ . . . all theme files here . . .}
When I activated the theme I got the following error
Template part has been deleted or is unavailable: header
Interestingly, not sure how I thought to adjust this, but I decided to deactivate the theme and activate the default Twenty-Twenty One theme. Next, I moved the ambitious folder up one level to be directly under the themes folder. I then reactivated the theme and now all the template parts could be found.
I am unsure the method Gutenberg uses to parse for the template parts, but it appears that if the theme is not at the root level then the parts cannot be located correctly. I could delve deeper into this, but it is also very likely that this will no longer be an issue in the final WordPress 5.9 release. But just in case you encounter a similar error, possibly check that you have installed the theme directly under “wp-content/themes”