Tagged: Wp All Import, wpml
-
AuthorPosts
-
May 23, 2018 at 3:01 pm #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.
May 24, 2018 at 4:20 pm #961644Hey 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ünterMay 25, 2018 at 5:55 pm #962303Thank 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.
May 28, 2018 at 1:28 pm #963172Hi,
Alright. Please keep us posted. I’ll tag @Gunter in case this needs an update.
Best regards,
IsmaelMay 31, 2018 at 4:31 pm #964826Hello 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
June 6, 2018 at 4:49 am #967610Hi,
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,
IsmaelJune 6, 2018 at 7:45 pm #968021This reply has been marked as private.June 10, 2018 at 7:41 am #970645Hi,
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,
DudeJune 11, 2018 at 2:52 pm #971210This reply has been marked as private.June 12, 2018 at 11:44 pm #971957This reply has been marked as private.June 13, 2018 at 2:15 am #971991Hi,
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,
IsmaelJune 18, 2018 at 3:12 pm #974306This reply has been marked as private.June 19, 2018 at 11:02 am #974695Hi,
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,
IsmaelJune 20, 2018 at 5:25 pm #975388This reply has been marked as private.June 21, 2018 at 5:42 pm #975883Hi,
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,
DudeJune 25, 2018 at 3:00 pm #977523This reply has been marked as private.June 28, 2018 at 2:11 am #978660 -
AuthorPosts
- You must be logged in to reply to this topic.