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

Last updated by Yvette 4 weeks, 1 day ago.

Assigned support staff: Yvette.

Author Posts
August 6, 2019 at 4:20 pm

Jordi Romeu

Hi!

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.

In an all ticket (https://wpml.org/forums/topic/problems-trying-to-import-spanish-products-with-wp-all-import-and-wpml/#post-4349443) we reported this to you. You said we had to update WordPress, Wocommerce and all 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 to the problem 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 appears when WP All Import tries to import woocommerce product variations.

Jordi

August 7, 2019 at 1:53 pm #4355725

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

At the moment, WPML API will only support product import of variations that use GLOBAL attributes.

These attributes should be translated previous to import (like any other taxonomy).

Are your variations using global or custom attributes?

Thanks for the clarification.

August 8, 2019 at 5:37 am #4359739

Jordi Romeu

Hi!

The products use attributes configured at Woocommerce > Attributes. I understand this are GLOBAL attributes. Right? You can check it in the attached pictures.

Some of them are fully translated. Other no. So could this be the problem? Check the screenshots.

Thanks.

August 8, 2019 at 9:16 am #4361431

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Can you tell which product failed to import?

If so, then please check if the variations for this product contained one of the non-translated global attributes.

Alternatively, you might try just completing all translations and then seeing if the import completes.

August 9, 2019 at 5:32 am #4367443

Jordi Romeu

Good morning!

We have chosen to translate all attributes. Everything works correctly, except for the translation of the "Sizes" attribute.

In Wocommerce Multilingual> Attributes, when we do the translations for "Sizes" it seems that they are modified correctly. But if you reload the page and select "Sizes," then there is no translated item.

Instead, if we go to Products> Attributes in Woocommerce, there are all correctly translated.

Maybe it is a bug?

Thanks,

Jordi

August 12, 2019 at 10:24 am #4380007

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

It looks like there is a notification that only the first 1000 terms are being loaded.... My suspicion is that due to the large number of terms, the display is "incorrect".

I can see that the terms are all translated if I edit one of the terms from the nomral WordPress taxonomy interface.

Is this issue causing you to not be able to import your translated products?

August 19, 2019 at 10:38 am #4415271

Jordi Romeu

Hi Yvette,

I will investigate it just now. I answer to prevent the support line from closing.

Jordi

August 19, 2019 at 11:55 am #4415731

Jordi Romeu

Hi again Yvette,

I have good and bad news:

GOOD NEWS

I have detected the issue. It is related to the attribute called "Sizes" as you said. Trying it with one product, I translated the corresponding attribute and imported the product correctly.

BAD NEWS

I'm detecting a strange behaviour. If I go to Woocommerce > Woocommerce multilingual > Attributes > Sizes, and translate the first term it seems all is working ok. But if you reload the page, you will see that the element is now not translated!! It's very strange!

If you use tha paginator and go to the lasts pages, you will see there are terms correctly translated. But the ones on the first pages seems to not be translated correctly.

Can you help me?

Jordi

August 19, 2019 at 1:16 pm #4416295

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hmmm - I think this may be because there are so many terms.

Could you try the following:
- temporarily deactivate all your non-WPML plugins (except for Woocommerce)
- change your theme temporarily to "Storefront".
- if you can, allocate more memory to your WordPress install via wp-config.php
- activate debug mode for WordPress

Then, use WPML > Taxonomy Translation tool to attempt to translate the first term. Does anything come up in the debug log?

Thanks

August 19, 2019 at 2:13 pm #4416753

Jordi Romeu

Hi Yvette,

I've done all what you said.

If you visit cerabella.com now, only WPML and Woocommerce plugins are activated, Storefront is the theme. Allcoated 256M for wordpress in wp-config.php. Also debug mode is active. I tried to change the first term in WPML > Taxonomy translation. But nothing happens. I can't see any error message in screen. Can't see too the file /wp-error.log.

Can you check it. I will mantaing plugins desactivated, and the other configuration as now it is, for your revision.

Thanks.

Jordi

August 20, 2019 at 8:09 am #4421437

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

I believe this is a bug on our end with the display capabilities of the Taxonomoy Tool when there is a large number of terms to display. When I go to view the attributesusing the WordPress interface:

Products > Attributes > Sizes > Configure Terms

I see the same number of terms in each language and the "first terms! like "0,2x2 cm" that does not appear translated in the Taxonomy Translation interface, is definitely translated (see images)

I can confirm this in our translation tables (see image), so technically, I can confirm that the example term we are looking at has been completely translated although the Taxonomy Tool is showing that it is not.

In order to escalate this bug to our developers, can you please send me a copy of your site as per this article?
https://wpml.org/es/faq/como-proporcionar-una-copia-del-sitio-al-personal-de-soporte/

I am opening the private area for the Duplicator files. Please use a file sharing service (e.g. WeTransfer, FileShare) to send us the files and only include a download link in your next response.

The topic ‘[Closed] Problems trying to import Spanish products with WP All Import and WPML’ is closed to new replies.