• ResolvedModerator threadi

    (@threadi)


    Hi,

    It’s about one of my own plugins where I allow users to generate individual Elementor Forms as templates. To do this, I create a file as a template and transfer it as such:

    Plugin::$instance->templates_manager->get_source( 'local' )->import_template( $filename, $file_to_import );

    A file with this content, for example, is transferred:

    {"content":[{"id":"173feb12","settings":[],"elements":[{"id":"62aa8ad5","settings":{"content_width":"full","form_name":"hgkghkgh","form_fields":[{"custom_id":"first_name","field_label":"Vorname","_id":"first_name","required":"true"},{"custom_id":"last_name","field_label":"Nachname","_id":"last_name","required":"true"},{"custom_id":"email","field_label":"E-Mail","_id":"email","required":"true","field_type":"email"},{"custom_id":"phone","field_label":"Telefon","_id":"phone"},{"custom_id":"cv","field_label":"Lebenslauf","_id":"cv","required":"true","field_type":"upload","file_types":"pdf,docx,doc,jpg,png,txt,jpeg,odt,ods,xlsx,rtf,xls,pptx,ppt,gif,tif,tiff,bmp,csv,rar,gz,zip,7z"},{"custom_id":"my-post-id","field_label":"","_id":"my-post-id","field_type":"hidden","__dynamic__":{"field_value":"[elementor-tag id=\"my-post-id\" name=\"my-id\" settings=\"%7B%7D\"]"}}],"step_next_label":"Next","step_previous_label":"Voriger","button_text":"N\u00e4chster","email_content":"[all-fields]","email_content_2":"[all-fields]","success_message":"Deine \u00dcbermittlung war erfolgreich.","error_message":"Deine \u00dcbermittlung konnte wegen einem Fehler nicht gespeichert werden.","server_message":"Deine \u00dcbermittlung konnte wegen einem Serverfehler nicht gespeichert werden.","invalid_message":"Ihre \u00dcbermittlung ist fehlgeschlagen, da das Formular ung\u00fcltig ist.","required_field_message":"Feld ist erforderlich."},"elements":[],"isInner":false,"widgetType":"form","elType":"widget"}],"isInner":false,"elType":"container"}],"page_settings":[],"version":"0.4","title":"hgkghkgh","type":"section"}

    This works perfectly for several dozen users (as well as in any test system I use). For a single user, however, the Elementor template is created with the correct name, but it has no content.

    Today I went through the Elementor code with the user concerned to see what was causing the problem. I did the debugging identically for me and for him. In Source_Local::import_single_template() after

    $content = $this->process_export_import_content( $content, 'on_import' );

    no setting array is generated for him – for me there is. As a result, Elementor can apparently no longer process the import correctly and generates a template, but with an empty array [] in _elementor_data.

    Does anyone have an idea about this?

    We are using both the actual Elementor version with TwentyTwenty as Theme and no other active plugins.

    • This topic was modified 1 year, 1 month ago by threadi.
Viewing 1 replies (of 1 total)
  • Plugin Support vipul78

    (@vipulelementor)

    Hi @threadi

    I apologise for the delay in getting back to you for your query.

    I see that your query is technical in-depth working of the Elementor plugin.

    You can go to out Github account where you may get in contact with a member of our development team to query this with.
    Please note that this is not an official support channel but a respective member of the development team will respond to your post as soon as they are available along with other members.

Viewing 1 replies (of 1 total)

The topic ‘Custom Import not running in one instance’ is closed to new replies.