Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
When attempting to translate a product using WPML, two issues occur: 1) slug translation is not available, and 2) every other attempt results in only code translation being available, not visual.
Solution:
The issue is identified in the file

plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-wysiwyg-field.php

. It involves a function that loads translation jobs, which interacts with another process in WPML, causing the problem. A temporary workaround involves commenting out specific lines in the mentioned file to prevent the issue. However, our developers have currently decided not to permanently fix this issue due to past complications with the wpautop function. If more reports arise, they may reconsider.

If this solution does not resolve your issue or seems outdated, please check the related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket for further assistance at WPML support forum.

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.

Tagged: 

This topic contains 26 replies, has 2 voices.

Last updated by Marcel 3 weeks, 6 days ago.

Assisted by: Marcel.

Author Posts
September 22, 2024 at 4:58 pm #16206503

alinam-2

Background of the issue:
Hello
When I want to translate a product via WPML translator
1. slug translation is not proposed
2. every 2 times, roughly, only code translation is available, not visual one

Symptoms:
This roughly happens every 2 times for code / visual
Systematically for slug

Questions:
How to get normal behavoir

September 23, 2024 at 9:05 am #16208038

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

do you use our Classic Translation Editor or Advanced Translation Editor?

Can you please add a screenshot of the code part you see?

Best Regards,
Marcel

September 23, 2024 at 12:40 pm #16209669

alinam-2

Hi,
I traditionnally only use classic translation editor.
But now need also wordpress editor, since I can't write in HTML
As you will see, the "visual" windows are empty ... only code is accessible
The slug translation is also missing
Kind regards

wpml-no-visual-translation.jpg
September 23, 2024 at 12:41 pm #16209715

alinam-2

PS: this also happens even if all plugins -but woocommerce and WMPL - are deactivated.

September 23, 2024 at 3:41 pm #16210658

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

regarding the "Visual" mode, you can try the workarounds mentioned on: https://wpml.org/errata/visual-tab-in-classic-translation-editor-is-not-showing-contents-after-update-to-wordpress-5-6/. There is an old bug with the WP TinyMCE component.

Best Regards,
Marcel

September 23, 2024 at 6:08 pm #16211374

alinam-2

Hi,
1. use Advanced Translation Editor. Not interested.
2. Outdated
3. had tried, did not work. It may work sometimes when reloading the pages, but is anyway a waste of time and resource, for each product x each translation ...

So, I just tried.= 5. No effect.

not sure that the issue is from TinyMCE ... seems more to be WPML's

Attached, an image with the original text / code of a given product. It's "normal".

If I look at the version to be translated in WPML it's different. There are <p> </p> added .... which are not in original version. TinyMCE doesn't work with blocks.

And last, the slug is not proposed for transalation.

So, the 2 issues remain

Waiting for your feedback

Kind regards

wpml-no-visual-translation-original-product-code-in-translator.jpg
wpml-no-visual-translation-original-product-code.jpg
September 24, 2024 at 10:06 am #16213697

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

The issue you're encountering is related to a bug in WordPress Core, not WPML. Like many other plugins, we use the TinyMCE editor, which is still included in WordPress even if you're using blocks. Other plugins also rely on this editor. Our suggested workarounds aim to bypass this core issue.

If you need further assistance, I recommend posting your issue in the WordPress core ticket: https://core.trac.wordpress.org/ticket/53644 or trying the last workaround mentioned there by one of our own developers. You can also find numerous reports about this issue hidden link">here.

Regarding the slug:
Regarding the slug translation: If you'd like to translate your product slug using the WPML Classic Translation Editor, you'll need to enable this option under WPML -> Settings -> Translated Documents Options. Change the setting from "Auto-generate from title (default)" to "Translate (this will include the slug in the translation and not create it automatically from the title)".

You can see an example of this setup hidden link">here (hidden link">Login to Sandbox)

Best Regards
Marcel

September 24, 2024 at 12:11 pm #16214572

alinam-2

Hi,
Sorry, I don't understand, since it's just about ... suppositions, rather than facts.
Who is adding the <p> </p>?
If this is WP, though they are invisible on my side and site on whichever product, could you precise where it does come from and explain factually how this could be generated by WP / Woocommerce?
Regards

September 24, 2024 at 12:25 pm #16214733

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

I'm talking about the "Visual" Mode not showing anything, and that's a caused by an unsolved WP core ticket.

If you are getting p Tags added, please provide me with an isolated staging environment where only WPML, WooCommerce and WooCommerce Multilingual are active so we can isolate and reproduce the issue.

Please also try first to increase your WP_MEMORY_LIMIT to min. 128MB, as your setup is running below system requirements for WPML and WooCommerce (not PHP_Memory, that's enough bot your WP_MEMORY_LIMIT defined as constant in WP_MEMORY_LIMIT)

Best Regards
Marcel

September 24, 2024 at 10:03 pm #16217694

alinam-2

Hello,

I changed the wp-memory limit to 128. No effect. What is logical since I never got memory exhausted or whatever like this.

Now, fact is that visual translator works ca every 2 times. So, it's not always, and it's not never. How could you relate this to "an unsolved WP core ticket", which is 3 years old, while the problem I am reporting is recent. I think since WPML included a wordpress translator.

Re. the p tags, sometimes there are present, sometimes not. And anyway, they are never in original product (in WC), they are only in WPML translator. So, logically, they can't be added by WP / WC, only by WPML, you have the facts.

For you, there is no relationship between the 2 events. It's a guess without fact.
For me, since they coincide, are concomitant, I believe the opposite. There are 2 "things" where the behavior is sometimes "yes", and sometimes "no".

Finally, I have a staging site, which you can use freely.

Give me a way to add the credentials
Kind regards

September 25, 2024 at 5:47 am #16218106

alinam-2

ps: your slug proposition does not work No slug translation is proposed in classic editor in spite of the change.

September 25, 2024 at 5:50 am #16218107

alinam-2

sorry, slug translation works now.
Thank you for that one
Kind regards

September 25, 2024 at 12:22 pm #16220282

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

the next answer is marked as private for the credentials.

Best Regards,
Marcel

September 25, 2024 at 5:03 pm #16221993

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

the provided credentials are not working to access the Web-Auth protecting the Backend. Could you please check them? Thank You!

Best Regards,
Marcel

September 26, 2024 at 5:40 pm #16227031

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Thanks for the access.

I changed the wp-memory limit to 128. No effect. What is logical since I never got memory exhausted or whatever like this.

The site currently requires a minimum of 141MB of memory. You can view the current usage here. Please note that this increased memory requirement is not only due to WPML but also required by plugins like WooCommerce.

Regarding the p Tags:

Re. the p tags, sometimes there are present, sometimes not. And anyway, they are never in original product (in WC), they are only in WPML translator. So, logically, they can't be added by WP / WC, only by WPML, you have the facts.

From what I can see, when you open a product like hidden link">this one, you can see the <p> tag in the "Contenu / Description" field. It disappears when you switch between "Visual" and "Text" modes. I can reproduce this behavior on every page refresh.

I will check the database and get back to you.

Regarding the "Visual Mode"
Since the visual mode seems to be functioning, you won’t need the workaround I mentioned earlier. I suggested it because your screenshot showed an empty 'Purchase Note' field, which is typical for this issue. However, the field was indeed empty in the product itself, so it doesn’t seem to be related to the <p> tag issue. Unless you've noticed any specific products where the 'Visual' mode is always empty and the content only appears in the 'Text' mode. If yes, please let me know.

Best Regards,
Marcel