Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #960840

    Hello,
    I’m one of the web developers on our team in charge of migrating our website to a new server and upgrading plugins and the Enfold theme.

    We were originally using Xili for our translations but switched to WPML for it’s continued maintenance and compatibility with the Enfold theme. Unfortunately, upon importing custom CSV files through WP All Import, using the WP ML add-on, Enfold fails to render the pages. Common errors are:

    
    Notice: Undefined offset: 0 in /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/codeblock.php on line 250
    
    Notice: Undefined index: index in /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/buttons_fullwidth/buttons_fullwidth.php on line 421
    
    [avia_codeblock_placeholder uid="0"] 
    
    

    There are no other plugins running except a custom written e-learning plugin, WP ML and WP All Import. Custom XML Configuration is currently set using the document provided by the WP ML developer team, located at https://raw.githubusercontent.com/OnTheGoSystems/wpml-config/master/enfold/wpml-config.xml

    What we can not do: Individually translate each page. We have over 1,000 pages translated in over ten languages. Everything must be done in bulk, thus the reason behind WP All Import. Enfold was currently upgraded to the latest version and our child theme is up to date.

    I am currently at a lost and can’t figure out why this happening. I have searched these forums for a solution but the errors are so generic none of the solutions apply to our current dilemma.

    Reaching out to the developers here for support on how to resolve this issue.

    #961644

    Hey tdisdi,

    Thank you for using our theme.

    I’m afraid, that is a problem you have to contact WPML, why they execute shortcodes on importing content of a post.
    WPML has the structure of our Advances Layout Builder elements in their XML file and therefore know what needs to be translated. That works on manual translating and should also work on bulk import.

    One idea I have is – remove all files in enfold\config-templatebuilder\avia-shortcodes\ and try to import.

    Best regards,
    Günter

    #962303

    Thank you for your response. I will look into contacting WPML support, but in the mean time I will remove those files from that folder and attempt another import.

    Thank you.

    #963172

    Hi,

    Alright. Please keep us posted. I’ll tag @Gunter in case this needs an update.

    Best regards,
    Ismael

    #964826

    Hello Ismael,

    We’ve targeted the issue to be something wrong with the importer. New pages using the Enfold system work perfectly without issue. Any imported page breaks. There is something amiss with the serialized dump of the avia_shortcode meta data and the import of that meta data into the database.

    If you or your team mates have any further insights as to why this would break on an import, it would be greatly appreciated.

    Thank you

    #967610

    Hi,

    Thanks for the update. Please provide the WP and FTP details in the private field. We would like to check the dashboard. When did you create those pages?

    Best regards,
    Ismael

    #968021
    This reply has been marked as private.
    #970645

    Hi,

    Can you please post a link to a page where the code block doesn’t work? Did you import/export all post meta fields with WP All Import – the code block element creates a separate post meta field for each code block because otherwise the editor could mess with the formatting of the code.

    Best regards,
    Dude

    #971210
    This reply has been marked as private.
    #971957
    This reply has been marked as private.
    #971991

    Hi,

    We can’t enable the ALB when we try to edit the page. It switches back to the default editor after the update. We deactivated the plugins temporarily but then we encountered another error with the header.php file which is related to the ITI plugin? What does that plugin do?

    Please disable the modifications in the child theme folder temporarily including the functions.php file.

    Best regards,
    Ismael

    #974306
    This reply has been marked as private.
    #974695

    Hi,

    Thanks for the update.

    Unfortunately, we are still not sure what causes the issue. Please provide the FTP details in the private field so that we can disable the child theme modifications temporarily just to make sure that they’re not the problem. Can you switch to the advance layout builder? It reverts back to the default editor on update.

    Best regards,
    Ismael

    #975388
    This reply has been marked as private.
    #975883

    Hi,

    We are unable to switch to the Advance Layout Builder. I’ve included the FTP details.

    That’s the problem – the code element requires the template builder to function properly.
    However as a quick fix I uploaded a modified version of the codeblock shortcode file (/enfold/config-templatebuilder/avia-shortcodes/codeblock.php). I commented out four lines and replaced:

    
    $content = ' [avia_codeblock_placeholder uid="' . avia_sc_codeblock::$codeblock_id . '"] ';
    

    with:

    
    //$content = ' [avia_codeblock_placeholder uid="' . avia_sc_codeblock::$codeblock_id . '"] ';
    

    and

    
    ShortcodeHelper::$shortcode_index += avia_sc_codeblock::$shortcodes_executed[ avia_sc_codeblock::$codeblock_id ];
    avia_sc_codeblock::$codeblock_id++;
    
    

    with

    
    //ShortcodeHelper::$shortcode_index += avia_sc_codeblock::$shortcodes_executed[ avia_sc_codeblock::$codeblock_id ];
    // avia_sc_codeblock::$codeblock_id++;
    
    

    and

    
    add_filter('avia_builder_precompile', array($this, 'code_block_extraction'), 1, 1);
    add_filter('avf_template_builder_content', array($this, 'code_block_injection'), 10, 1);
    

    with

    
    //add_filter('avia_builder_precompile', array($this, 'code_block_extraction'), 1, 1);
    //add_filter('avf_template_builder_content', array($this, 'code_block_injection'), 10, 1);
    

    The changes deactivate all “avia layout builder” dependencies and the codeblock will be processed directly like any other shortcode. The downside of my fix is that you won’t be able to use the codeblock with the “avia layout builder” anymore but we can revert the changes as soon as the template builder works again. I marked this thread for Günter to check the template builder issue.

    Best regards,
    Dude

    #977523
    This reply has been marked as private.
    #978660

    Hi,

    Yes, it looks like a temporary workaround. You can still use the advance layout builder but the code block element will not work properly or as it should.

    Best regards,
    Ismael

Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.