Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by Jordi Romeu 6 months, 3 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
July 24, 2019 at 4:28 am #4270181

Jordi Romeu

Good morning!

We have a website with Woocommerce, and the plugins WPML, WP All Import and WPML All Import Add On.

It works all great for importation of products in original language (catalan). But for translated language (spanish) it cracks. We talked with WP All Import support team and they say it's a problem with WPML add on.

Looking at server's PHP logs, we can see this error:


[23-Jul-2019 05:18:16 UTC] PHP Warning:  mysqli_real_escape_string() expects parameter 2 to be string, array given in /usr/home/ on line 1102
[23-Jul-2019 05:18:17 UTC] PHP Warning:  mysqli_real_escape_string() expects parameter 2 to be string, array given in /usr/home/ on line 1102
[23-Jul-2019 05:19:11 UTC] Error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-5-1,wp_uam_accessgroups,wp_uam_accessgroups_1-5-1,wp_usermeta,wp_users,wp_wc_do' at line 1 de la base de datos de WordPress para la consulta 
				s.domain_name_context_md5 AS ctx ,
				st.value AS translated,
				st.mo_string AS mo_string,
				s.value AS original,
			FROM wp_icl_strings s
			LEFT JOIN wp_icl_string_translations st
					AND st.language='es'
					AND s.language!='es'
			WHERE s.context = 'default'
			 LIMIT 1000 OFFSET 6000 realizada por do_action('wp_ajax_sweep'), WP_Hook->do_action, WP_Hook->apply_filters, WPSweep->ajax_sweep, WPSweep->sweep


Can you help us?



July 24, 2019 at 7:31 am #4271065

Bruno Kos

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi Jordi,

Thank you for contacting WPML support!

Can you update WPML plugin, all its addons, WordPress, WooCommerce and other plugins before we resume debugging this? We can only support our clients if they have the latest versions installed, as this means that there have been many upgrades, bug fixes and general improvements since.

E.g. I can see that you are on a WordPress version 4.9.10, while WPML version on your site is 4.0.3., which is more than one year old now. WooCommerce is on 3.4.3 version, which means that it requires updates as well, because there have also been some major changes in its code base, which was then covered by WooCommerce multilingual updates.

Have a look at all the latest versions here:

Bruno Kos

August 6, 2019 at 4:04 pm #4349443

Jordi Romeu

Good afternoon!

We updated WordPress, Wocommerce, WPML and all other plugins. We've done it and tried to import again. Default language importation worked well. But secondary language importation is generating this error in PHP logs:

Maybe you can find the answer in this log.

Detalles del error
Se produjo un error del tipo E_ERROR en la línea 312 del archivo /usr/home/ Mensaje de error: Uncaught Exception: No trid for product variation in secondary language, imposssible to set _wcml_duplicate_of_variation in /usr/home/
Stack trace:
#0 /usr/home/ WPAI_WPML->saved_post(43119)
#1 /usr/home/ WP_Hook->apply_filters('', Array)
#2 /usr/home/ WP_Hook->do_action(Array)
#3 /usr/home/ do_action('pmxi_saved_post', 43119, Object(SimpleXMLElement), false)
#4 /usr/home/ PMXI_Import_Record->process('

It seems the error is going when WP All Import tries to import vartiation products.