X-pro template files wont import

Hello :slight_smile:

I am trying to import x-pro template file (.tco), in the template manager. It results in error message “The template is not properly formatted”

Skærmbillede 2020-09-27 kl. 12.23.19

Themes and plugins are updated. Could you please help me find a solution?

Best regards Simon

Hey Simon,

The cause of the error is usually a broken HTML or invalid character somewhere on the source page.

What you can do is duplicate the source page and remove all the sections except the first one then save the page as a template and try to import it. If the page imports successfully, the broken HTML is somewhere within the other sections.

Just repeat that process to find what section is causing the issue until you drill down to the elements within the section.

Only if you’ve deleted all the sections yet the issue persists, please give us the following information in a Secure Note.

  • URL of the page you’ve saved as a template
  • WordPress Login URL of the source site and the destination site
  • Admin level username and password of both sites

You can find the Secure Note button at the bottom of your posts.

Thanks.

Hello,

I have tried to narrow it down, by saving templates sections separately, but with no luck. I have tried to export a very simple header structure as a template, and i get the same error.

No matter what i try with different templates, different template sections, different pages templates i get the same error.

I have provided info in secure note.

Thanks

Hey @Digixio,

I created a new test page and saved it as a templated and importing to the test site is successful. This means that there is no issue with the export/import function.

I’ve also loaded the broken template to a test page and removed all sections then saved the empty page as a template (Broken Page Test Removed All Sections) again and it imported to the new site successfully.

Now the problem is in the 2nd Section as I’ve also tested removing the 1st section and it still can’t be imported. Only deleting the 2nd Section works.

image

You have special characters in your 2nd section. I’ve said this previously already. Kindly remove all broken HTML and invalid or special characters in your content. If you wish for those characters to work, please contact your database administrator of the site you wish to import the template to accept those characters. This is not an issue with the Template Manager.

image

image

Hope that helps and thank you for your cooperation.

Hello again,

Nice that the function does work, Thanks for the insight. I have tried to correct my language special character, but still no luck.

I think it is a bit problematic that the template manager, does not serv any specification on what “wrong” formatting that causes the error, instead of generic message that just brings frustration. Error messaging in the template manager would bring much more clarity to the user.

I will try the long process of narrowing down the generic “wrong” formatting.
Thanks for you test and help.

Best regards Simon

Hey Simon,

Thanks for your feedback. I believe this is already in our developer’s mind but I’ll add that as a feature request to be sure.

Hello ,

I found out that svg images also breakes the formatting of the template. Just for for your information if you didnt knew.

Best regards Simon

Hi @Digixio,

Thanks for this feedback as well.

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.