If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 3 months, 2 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/cerabella.com/web/wp-includes/wp-db.php 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/cerabella.com/web/wp-includes/wp-db.php 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 
			SELECT
				s.id,
				st.status,
				s.domain_name_context_md5 AS ctx ,
				st.value AS translated,
				st.mo_string AS mo_string,
				s.value AS original,
				s.gettext_context
			FROM wp_icl_strings s
			LEFT JOIN wp_icl_string_translations st
				ON s.id=st.string_id
					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?

Thanks,

Jordi

July 24, 2019 at 7:31 am #4271065

Bruno Kos
Supporter

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:
https://wpml.org/download/wpml-multilingual-cms/?section=changelog

Regards,
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/cerabella.com/web/wp-content/plugins/wpml-all-import/wpml-all-import.php. Mensaje de error: Uncaught Exception: No trid for product variation in secondary language, imposssible to set _wcml_duplicate_of_variation in /usr/home/cerabella.com/web/wp-content/plugins/wpml-all-import/wpml-all-import.php:312
Stack trace:
#0 /usr/home/cerabella.com/web/wp-includes/class-wp-hook.php(288): WPAI_WPML->saved_post(43119)
#1 /usr/home/cerabella.com/web/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#2 /usr/home/cerabella.com/web/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#3 /usr/home/cerabella.com/web/wp-content/plugins/wp-all-import-pro/models/import/record.php(3878): do_action('pmxi_saved_post', 43119, Object(SimpleXMLElement), false)
#4 /usr/home/cerabella.com/web/wp-content/plugins/wp-all-import-pro/controllers/admin/import.php(2804): PMXI_Import_Record->process('
---

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

Jordi