• Resolved Ambyomoron

    (@josiah-s-carberry)


    When I try to important a template exported from Elementor, it fails with the following message displayed: Invalid File
    This message appears on a white screen.
    This error occurs with all the different templates I have tried, including the simplest possible template: a page with a title a a single blank section.
    The problem exists with all plugins disabled (excepting Elementor, of course).
    The problem exists when trying to import into a completely different system from the one from which the template was exported, as well as importing back into the same system from which it was exported.
    The problem exists with the theme twenty-ten, as well as with the theme twenty-fifteen, both out of the box. It also exists with a child theme of twenty-ten.
    The problem exists with the very simple .htaccess file that is created by WordPress.
    There are no php or apache errors logged in the system in relation to this problem. Enabling debugging provides no additional information.

    Here is an example of a json file exported by Elementor that fails on import:

    *** START OF FILE *** (there is indeed a blank line at the beginning)

    {“version”:”0.3″,”title”:”testt”,”type”:”page”,”data”:[{“id”:”nvrbbov”,”elType”:”section”,”settings”:{“section_layout”:””,”stretch_section”:””,”layout”:”boxed”,”content_width”:{“unit”:”px”,”size”:””},”gap”:”default”,”height”:”default”,”custom_height”:{“unit”:”px”,”size”:400},”column_position”:”middle”,”content_position”:””,”structure”:”10″,”section_background”:””,”background_background”:””,”background_color”:””,”background_image”:{“url”:””,”id”:””},”background_position”:””,”background_attachment”:””,”background_repeat”:””,”background_size”:””,”background_video_link”:””,”background_video_fallback”:{“url”:””,”id”:””},”background_overlay_section”:””,”background_overlay_background”:””,”background_overlay_color”:””,”background_overlay_image”:{“url”:””,”id”:””},”background_overlay_position”:””,”background_overlay_attachment”:””,”background_overlay_repeat”:””,”background_overlay_size”:””,”background_overlay_video_link”:””,”background_overlay_video_fallback”:{“url”:””,”id”:””},”background_overlay_opacity”:{“unit”:”px”,”size”:0.5},”section_border”:””,”border_border”:””,”border_width”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”border_color”:””,”border_radius”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”box_shadow_box_shadow_type”:””,”box_shadow_box_shadow”:{“horizontal”:0,”vertical”:0,”blur”:10,”spread”:0,”inset”:””,”color”:”rgba(0,0,0,0.5)”},”section_typo”:””,”heading_color”:””,”color_text”:””,”color_link”:””,”color_link_hover”:””,”text_align”:””,”section_advanced”:””,”margin”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”animation”:””,”animation_duration”:””,”css_classes”:””,”_section_responsive”:””,”reverse_order_mobile”:””,”heading_visibility”:””,”responsive_description”:””,”hide_desktop”:””,”hide_tablet”:””,”hide_mobile”:””},”elements”:[{“id”:”vwdfxef”,”elType”:”column”,”settings”:{“_inline_size”:null,”_column_size”:100,”section_style”:””,”background_background”:””,”background_color”:””,”background_image”:{“url”:””,”id”:””},”background_position”:””,”background_attachment”:””,”background_repeat”:””,”background_size”:””,”background_video_link”:””,”background_video_fallback”:{“url”:””,”id”:””},”border_border”:””,”border_width”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”border_color”:””,”border_radius”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”box_shadow_box_shadow_type”:””,”box_shadow_box_shadow”:{“horizontal”:0,”vertical”:0,”blur”:10,”spread”:0,”inset”:””,”color”:”rgba(0,0,0,0.5)”},”section_typo”:””,”heading_color”:””,”color_text”:””,”color_link”:””,”color_link_hover”:””,”text_align”:””,”section_advanced”:””,”margin”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”animation”:””,”animation_duration”:””,”css_classes”:””,”section_responsive”:””,”screen_sm”:”default”,”screen_sm_width”:”100″,”screen_xs”:”default”,”screen_xs_width”:”100″},”elements”:[],”isInner”:false}],”isInner”:false}
    *** END OF FILE ***

    Any help in either diagnosing the problem or getting a fix would be greatly appreciated.

Viewing 14 replies - 1 through 14 (of 14 total)
  • @josiah-s-carberry

    What is the active theme, what plugins are active on the site?

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    As I mentioned above, the theme is twenty-ten, albeit the problem exists with twenty-fifteen. And the problem exists with NO other plugins enabled.

    @josiah-s-carberry

    Could you repost your json template export file, since some of the code was cropped off in the earlier post.

    A Gist would be fine as well.

    https://gist.github.com/

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    *** START OF FILE *** (there is indeed a blank line at the beginning)
    
    {“version”:”0.3″,”title”:”testt”,”type”:”page”,”data”:[{“id”:”nvrbbov”,”elType”:”section”,”settings”:{“section_layout”:””,”stretch_section”:””,”layout”:”boxed”,”content_width”:{“unit”:”px”,”size”:””},”gap”:”default”,”height”:”default”,”custom_height”:{“unit”:”px”,”size”:400},”column_position”:”middle”,”content_position”:””,”structure”:”10″,”section_background”:””,”background_background”:””,”background_color”:””,”background_image”:{“url”:””,”id”:””},”background_position”:””,”background_attachment”:””,”background_repeat”:””,”background_size”:””,”background_video_link”:””,”background_video_fallback”:{“url”:””,”id”:””},”background_overlay_section”:””,”background_overlay_background”:””,”background_overlay_color”:””,”background_overlay_image”:{“url”:””,”id”:””},”background_overlay_position”:””,”background_overlay_attachment”:””,”background_overlay_repeat”:””,”background_overlay_size”:””,”background_overlay_video_link”:””,”background_overlay_video_fallback”:{“url”:””,”id”:””},”background_overlay_opacity”:{“unit”:”px”,”size”:0.5},”section_border”:””,”border_border”:””,”border_width”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”border_color”:””,”border_radius”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”box_shadow_box_shadow_type”:””,”box_shadow_box_shadow”:{“horizontal”:0,”vertical”:0,”blur”:10,”spread”:0,”inset”:””,”color”:”rgba(0,0,0,0.5)”},”section_typo”:””,”heading_color”:””,”color_text”:””,”color_link”:””,”color_link_hover”:””,”text_align”:””,”section_advanced”:””,”margin”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”animation”:””,”animation_duration”:””,”css_classes”:””,”_section_responsive”:””,”reverse_order_mobile”:””,”heading_visibility”:””,”responsive_description”:””,”hide_desktop”:””,”hide_tablet”:””,”hide_mobile”:””},”elements”:[{“id”:”vwdfxef”,”elType”:”column”,”settings”:{“_inline_size”:null,”_column_size”:100,”section_style”:””,”background_background”:””,”background_color”:””,”background_image”:{“url”:””,”id”:””},”background_position”:””,”background_attachment”:””,”background_repeat”:””,”background_size”:””,”background_video_link”:””,”background_video_fallback”:{“url”:””,”id”:””},”border_border”:””,”border_width”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”border_color”:””,”border_radius”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”box_shadow_box_shadow_type”:””,”box_shadow_box_shadow”:{“horizontal”:0,”vertical”:0,”blur”:10,”spread”:0,”inset”:””,”color”:”rgba(0,0,0,0.5)”},”section_typo”:””,”heading_color”:””,”color_text”:””,”color_link”:””,”color_link_hover”:””,”text_align”:””,”section_advanced”:””,”margin”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”margin_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_tablet”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”padding_mobile”:{“unit”:”px”,”top”:””,”right”:””,”bottom”:””,”left”:””,”isLinked”:true},”animation”:””,”animation_duration”:””,”css_classes”:””,”section_responsive”:””,”screen_sm”:”default”,”screen_sm_width”:”100″,”screen_xs”:”default”,”screen_xs_width”:”100″},”elements”:[],”isInner”:false}],”isInner”:false}
    *** END OF FILE ***

    So I saved that out as a json file and when I go to

    Elementor > My Library > Import Template
    https://docs.elementor.com/article/60-library

    It still shows as an Invalid File.

    Could you try to export out the template again?

    Also test that this JSON template imports in okay to Elementor.

    https://gist.github.com/lukecav/d7e6e77c1b7390dff3c1956b86cb8673

    • This reply was modified 9 years, 7 months ago by Luke Cavanagh. Reason: clarify wording
    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Here is my same template exported again: https://gist.github.com/JosiahCarberry/043db496798b43d8e18b53278be406d2

    As to your template, Ninja Forms Test, I was able to import it successfully. It shows simply the letter “n” in a single section.

    When I export that same template and compare your json file to my exported json file, I notice three differences:
    1. The blank line in my file at the beginning
    2. The IDs are all different (I suppose this is normal!?)
    3. Your file has the two characters “]}” at the end, whereas mine does not

    So, is the problem in the database with the template itself, or is the problem in the export of that template to the json file? That is the question.

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Following up on the diagnosis, on my two systems (test and prod), the end of every exported json file is truncated. Whereas the file might be expected to end with:

    “isInner”:false}]}

    instead, it ends with:

    “isInner”:fal

    If I add the missing characters manually, the template can be imported with success and appears to be complete. I infer from that that the data in the database is not corrupted.

    It remains to be determined why this is happening. I don’t think it is a php timeout, as I am set for 90 secs and the whole procedure doesn’t take more than a few secs. I don’t think it is a lack of memory, as I have 1.5 GB available and no other apps are running and there is only one session. But all this is only conjecture on my part.

    @josiah-s-carberry

    So if you create a new template then export out that template, does the JSON file have the same truncated issue?

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Yes, it happens for all templates.

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    In spite of all the upgrades done since this error was first posted, it is still an issue. I would really like to get to the bottom of it.

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    I note that this problem has now been fixed (elementor 1.3.2). maybe it was fixed earlier, but who knows? Unfortunately, the fix is probably inadvertent, as no one is taking any credit for it, meaning that the problem could easily revert. My fingers are crossed.

    Plugin Author ArielK

    (@arielk-1)

    Yes, we fixed the method of the saving data, it’s glad to hear that it solves your problem!

    Hi @josiah-s-carberry! How do you resolved it???

    I can’t import templates to muy remote site from my local siete. I tried with all the plugins deactivate, with twenty seventeen. The results is invalid file. I try to import in the same local site, but isnt working too. I need help!!

    Congrats for the wonderfull plugin to all the team.

    A hug!

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Hello JM,

    At some point, the problem simply disappeared. According to one of the messages above, there was a bug that was corrected. So make sure you have the latest version of Elementor.

    But if that does not solve the problem, here is what I did as a workaround. Maybe it will help you.
    1. The exported json files were defective. They were missing a few characters at the end. For example, a file should end with something like:
    “isInner”:false}]}
    Instead, it ends with:
    “isInner”:fal

    2. So, just open the file with a text editor and add the missing characters at the end – in the above example, se}]}
    3. I was able to import the json file after making that manual change.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Template import fails’ is closed to new replies.