Skip Navigation

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 7 replies, has 2 voices.

Last updated by Bruno Kos 8 months ago.

Assigned support staff: Bruno Kos.

Author Posts
December 3, 2019 at 8:39 am #5058349

jaakI

I am trying to: Import products to the main language

Expected result: All products from XML file are imported to the main language.

Actual result: Constant crash of the import process.

Workaround: Turn off WP All Import Multilingual

I've found this error message in WooCommerce log:
2019-11-19T12:14:39+00:00 CRITICAL Uncaught Exception: No trid for product variation in secondary language, imposssible to set _wcml_duplicate_of_variation in /data01/virt80483/domeenid/www.floristshop.ee/test/wp-content/plugins/wpml-all-import/wpml-all-import.php:312
Stack trace:
#0 /data01/virt80483/domeenid/www.floristshop.ee/test/wp-includes/class-wp-hook.php(290): WPAI_WPML->saved_post(29887)
#1 /data01/virt80483/domeenid/www.floristshop.ee/test/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters('', Array)
#2 /data01/virt80483/domeenid/www.floristshop.ee/test/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /data01/virt80483/domeenid/www.floristshop.ee/test/wp-content/plugins/wp-all-import-pro/models/import/record.php(3880): do_action('pmxi_saved_post', 29887, Object(SimpleXMLElement), true)
#4 /data01/virt80483/domeenid/www.floristshop.ee/test/wp-content/plugins/wp-all-import-pro/controllers/admin/import.php(2806): PMXI_Import_Record->process('<?xml version="...', Object(Closure), 2899, false, '/pmxi_records', 1)
#5 /dat failis /data01/virt80483/domeenid/www.floristshop.ee/test/wp-content/plugins/wpml-all-import/wpml-all-import.php real 312

During the import of the 3000 products (all variable), I got this error more than 60 times (counted from the woocommerce log). After turning off WP All Import Multilingual import went flawlessly.

In this post https://wpml.org/forums/topic/problem-with-wpml-all-import/ this error is discussed but without a real explanation.

Jaak

December 3, 2019 at 9:52 am #5059229

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

That is indeed the only ticket in our archives - my colleague Carlos said the following:

"This error means that the ID for the product variation in the seconday language isn't set."

He also said:

"I would like to ask you to double check if all products and their variations are translated before you do the import."

Based on these error messages, it would make sense that this is the issue. So since you said that:

"I got this error more than 60 times (counted from the woocommerce log)"

It could mean that there could be at least 60 variable products that are not translated. Can you check yourself whether this is the case in your site? You can quickly identify this by the fact that you may be having 3000 products in one language, but you can see that there are about 2950 or so in another language, that may indicate that some are not translated and WPML import expects them to be.

Regards,
Bruno Kos

December 3, 2019 at 10:12 am #5059391

jaakI

Hello,

The second language "German" is not touched yet. I'm importing the main language products (hidden link). Therefore there should not exist any translations.

December 3, 2019 at 11:16 am #5059901

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Therefore there should not exist any translations.

I see - in this case, it may explain it and I assume that you don't need to use WP All Import Multilingual at all, at least not in the first import as you will not be doing the second one I assume.

How will you translate German products, will you import them or translate them manually?

Regards,
Bruno Kos

December 4, 2019 at 6:43 am #5065519

jaakI

Hello,

I will import translations from an XML file.
During setup, I installed languages that I will need and all plugins what I will expect to use in case of a multilingual site.
This will mean that your plugin needs some improvement because if in import template I check import to the default language then the plugin has to deal with existence or absence of translations and they shouldn't influence import process.

December 4, 2019 at 12:29 pm #5068301

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

That is true, we need to see why it is hitting this error on your website. Therefore, may I ask you to try the import on this clean sandbox installation?

Just configure WPML languages and try the import (install your import plug-in here). When doing an import, exclude images and other heavy data, so that only texts are imported.

hidden link

I will send this case to our WPML import developer then, so that he can have a more thorough look at this.

Regards,
Bruno Kos

December 13, 2019 at 6:47 am #5120945

jaakI

Sorry for the late response. I need more time to prepare a sandbox installation. The year is ending!

December 13, 2019 at 7:11 am #5121005

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

No problem, whenever you can. BTW, that sandbox expired so I created another one.
hidden link

It expires after 7 days if nobody logged in.

Regards,
Bruno Kos

The topic ‘[Closed] WP All Import Multilingual generating Woocommerce error’ is closed to new replies.