Templates & Template Parts disappear when changing theme

Yesterday, everything was ok, but this morning the site displays a white page and I can’t find any template in the themer.
I thought that it was a licence problem, but I ran a couple of tests and I found that it is a Child-theme issue.
I installed the Child-theme through the link given by @Louis in the stream CPT, child theme & functions.php.
When I reactivate the Cwicly Theme, everything goes back well and the site is online again.
I absolutelly need a Child-theme because I must customize the Woocommerce emails and the emails templates must be in the directory: cwicly-child>woocommerce>emails.

Environment info

  • WordPress version: 6.0.2
  • Gutenberg Plugin version: not installed
  • Cwicly Plugin version:
  • Cwicly Theme version: 1.0.3

Hello @weedor,

Not sure how you didn’t experience an issue when installing the child theme.
Basically, this is how FSE works.
Templates and template parts are linked to their theme. If you change themes, you change templates and template parts.

This is a known limitation and last I looked is being reviewed by the Gutenberg team.

Or have I misunderstood your problem?

Yesterday, when I installed the Child-theme, at the beginning everything ran fine: I could send emails with the modifications made in the template customized in cwicly-child>woocommerce>emails.
If I correctly understand your answer, I must recreate all the templates for Child-theme.
The templates are still in database. Is there an easy way to switch them from Cwicly to Cwicly-child (export-import)?
I will be a huge job if I must recreate, one by one, all the templates and it is a little stupid to have them twice in the database.

Hello @weedor,

Unfortunately this is how the Gutenberg has chosen to proceed. You’ve perfectly summed it up.

I’ll try and give this a closer look over the coming days, as there might be an easy way to switch all templates and template parts over to the “current” theme.

Thank you @Louis
It is not a big deal: this kind of plugin is not updated very often and I will customize the template in the plugin and make a backup of this file that I will upload every upgrade.
I know that is is not top but I have no other option
If you have good news about this topic, please take me in!

The only experience I have with Gutenberg is through Cwicly where the theme is not relevant.
If a site is based on a theme (twenty-one for exemple), it is not be possible to upgrade to twenty-two?
In fact, it is very restrictive!

I think you can move the files from the part folder of parent to child theme.

I thought too that it was something like that but in the repertories of Cwicly there is almost nothing though I have 14 templates (Woocommerce is installed) and 1 Global part (header).



I am still stuck with this lack of feature for rtemplates.

I tried something and I need your advices to this process.

In Cwicly: I exported my templates (see screenshot beneath)

In Cwicly: I copied the files html from the repertories templates and parts
In Cwicly-child: I created the 2 repertories templates and parts and pasted the files copied before.

Now I can see in the Cwicly-child the templates and the templates parts.

But do you think that it is durable and I that I will not have issue with somethihng somewhere that was not correctly transfert. And what about the classes (virtual and global) that I set in Cwicly.

Can you give me your feeling.

The process seems to work fine.
I renamed the slug of the template in the folder.
I regenerated the HTML, etc.
Everything is ok!
Quid about old models stocked in the database?
Is it necessary to remove them?
Tell me, please, if you have knowledge.

The use of templates seems to me more and more frustrating.
When I used to build sites with Oxygen, I used an add-on named Editor Enhancer.
There was a button to save the template that was editing.
At any times, it was possible to save or to reload a saved version.
So it was possible to save before making main changes in the template.
Isn’t it possible to Cwicly to implement such a feature.

In the same times, it would be great to allow some kind of following process:

  • copy the content of a “live” template
  • create a new template
  • paste the content in this new template
  • work and make changes in this template
  • when all the improvements are ok, copy the content
  • open the “live” template
  • delete all the content
  • paste the copied content
  • save and the template with new content becomes “live”

Such a system could allow to devellop the site without perturbing the “live” site.
Up to now, every changes made in a template is immediately seen by visitors → not good at all!

1 Like