-
Notifications
You must be signed in to change notification settings - Fork 57
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
Export: Getting Template part has been deleted or is unavailable: header
after uploading to a new site
#242
Comments
Seems like during the process of exporting, the create-block-theme/admin/class-create-block-theme-admin.php Lines 992 to 993 in 031eee5
eventually calling
...and then added back here
via create-block-theme/admin/class-create-block-theme-admin.php Lines 732 to 734 in 031eee5
This behavior was introduced in 1.6 with 6f00002 as part of #213 |
Thanks, @oskosk for the detailed description of the problem. |
I’ve experienced this problem as well. It only seems to happen, when theme name is multiple words. Shortening theme name to one word fixed the problem. |
The problem is related to the fact that the characters used in the theme slug were not sanitized correctly, specifically the white spaces. That problem is pre-existent with those changes. Anyways is a good opportunity to fix this bug and simplify the code a little. A potential fix: #244 |
Alright , thanks! |
Yep, but that's because in 1.5.1 in we remove the theme key in the template parts linked from templates. In 1.6.0 no, so the template parts were linked like this (following your example theme name): |
The same seems to happen when you try to create a clone of the TT3 theme, this was reported on this Forum review: Thanks, @matiasbenedetto for looking into this. |
More reports from the Create Block Theme forum: https://wordpress.org/support/topic/bug-exporting-templates-uses-wrong-theme-key/ |
The fix (#244) was merged and released in version 1.6.1 of the plugin. It should be working as expected now. |
Thank so much @matiasbenedetto |
Hello, @matiasbenedetto I faced the same issue when I export, clone, overwrite the TT3 theme. |
This regression should be fixed in the 1.6.3 version. |
It's fixed and works fine on version 1.6.3. Thank you! |
Hi, I have Spectra One Theme installed and am using the Spectra Plugin so I do not know if it maybe is related to those. Also the preview picture of the theme is missing in the themes overview, after creating the child theme. Apart from that everything is working flawlessly as fas as I can see. Best |
Also having problems with 1.13.1 and Wordpress 6.2.2. And in my case changing the theme name in htmls didn't help. I'm getting confused where the template parts with changes are actually stored - is it the html files, is it the database ... together with using WPML for translation this is getting a bit out of hands. |
I have the same issue now in 1.13.8 |
While working on a theme created from scratch with Create Block Theme I opted to export the theme using the Export the activated theme with user changes option:
I got a zip bundle and uploaded to another site. On that new site I visited the editor and was shown a message
Template part has been deleted or is unavailable: header
(footer as well).Workaround
I noticed then that the
templates/index.html
file part of the bundle created by the export was referring to the header part like this:... while my original file (the one generated from scratch) read:
After removing
"theme":"new blank theme"
the template worked properly loading the index part.How to reproduce
Template part has been deleted or is unavailable: header
andTemplate part has been deleted or is unavailable: footer
messages.The text was updated successfully, but these errors were encountered: