Please make sure to update to WPML 4.3.4 before reporting any issue

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

Last updated by Itamar 1 month, 2 weeks ago.

Assigned support staff: Itamar.

Author Posts
September 6, 2019 at 1:20 pm #4525455

George L.

Saving a composite product in the original language updates the Default Option (_bto_data -> default_id) of the translations to the original language component ID.

This results in components without a default option selected.

Steps to reproduce

1. Create a new Simple Product
2. Create a new Composite Product
3. Add a component and select the Simple Product
4. Make the component optional
5. Translate the Simple Product (using the translation editor)
6. Translate the Composite Product (using the translation editor)
7. Preview the translation of the Composite Product
Notice how the default option is there (yay!)
8. Save the original Composite Product
9. Preview the translation of the Composite Product

The translation is now gone. This is because upon saving of the original language, default_id of the component on the translation has been updated to the ID of the original language and not the ID of the translated Simple Product.

I have the _bto_* fields set to "copy".

Related (?) topics
https://wpml.org/forums/topic/woocommerce-variations-lost-on-saving-slave-language-variable-product/
https://wpml.org/forums/topic/issues-with-composite-products-plugin-and-wplm/

p.s. I cannot provide logins for our live server of a DB dump for live. I can provide logins for a staging where you can reproduce the issue.
p.s.2 You should be able to reproduce the issue on your local environments by following the steps I've given.

September 8, 2019 at 2:07 pm #4531767

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

To replicate this issue, I've created a test site with a fresh WordPress installation. You can access it through this link:
hidden link
Through this link, you will be automatically logged in. (If nobody logs in the test site will be available for one week from today.)

On this test (if I followed your instructions correctly), I was not able to replicate this issue.
The translated simple product is showing on the translated composite product. Please see it here. hidden link
And also the attached screenshot.

Can you see that it is OK on the test site?
If I didn't follow your instructions correctly can you please try and replicate the issue on the test site and tell me exactly what you do?

Thanks,
Itamar.

September 8, 2019 at 2:27 pm #4531839

George L.

Hi again. I just saved the composite product in the original language and the default option is no longer show in French. See attached and on the URL you sent me

September 9, 2019 at 11:01 am #4536101

George L.

Upon reading your comment again, it appears you misunderstood my issue.

The problem is that on the translated language, the default option is not pre-selected so the two pages are not identical.

See the screenshots attached

September 9, 2019 at 7:20 pm #4539891

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

OK, I can see what you mean now.
But can you please explain to me which option is setting a component to be the default component?
I've checked things, and I do not think that it is the 'optional' option that you mention in step 4.

Thanks,
Itamar.

September 9, 2019 at 7:40 pm #4539925

George L.

The bug cannot be reproduced if you don't follow step #4 because WC forces a default option.

Attached is where you set the default option.

I'd appreciate if you could escalate to 2nd level asap, as we don't have a viable workaround. There is enough context to reproduce and resolve the issue.

September 10, 2019 at 1:44 pm #4546039

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

Today we have released new versions of our plugins.
WPML Multilingual CMS 4.2.8
String Translation 2.10.6
Translation Management 2.8.7
WooCommerce Multilingual 4.6.7

On the test, I've updated WPML and its add-ons to those latest versions, and the issue is not replicable anymore. Please see it on the test site here.
hidden link
And also see the attached screenshots.

Please update WPML plugins also on your site and check if the issue persists.

Thanks,
Itamar.

September 10, 2019 at 1:58 pm #4546175

George L.

You are wrong!

Just saved both of the composite product on the original language and the component was lost on the translated version.

PLEASE ESCALATE this bug ASAP and stop wasting my time trying to debug.

September 11, 2019 at 6:41 am #4550843

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

This issue is now escalated to our compatibility team.

As a workaround, you can update the translated product, and the Default Option of components will be there again.

I'll keep you updated here on any news regarding this issue.

Regards,
Itamar.

September 11, 2019 at 6:54 am #4550941

George L.

Saving the translation will not work, because the moment the original product gets updated, the translation will break again.

Also, setting _bto_data to "copy once" is not an option as the composites will get out of sync.

September 11, 2019 at 9:19 am #4552059

George L.

Also, even though the "Default option" field in the translated language is unlocked, the options don't save, so you can't follow the workaround you suggested

September 11, 2019 at 7:37 pm #4556251

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

I'm sorry if I've fogot to mention this. The updating of the translated products needs to be done on WPML's Translation Editor and not on the WordPress editing screen.

I'll keep you updated about news from our compatibility team.

Regards,
Itamar.

September 19, 2019 at 11:53 am #4604373

George L.

Hi again,

Just to confirm, this bug persists even if you change the _bto_data to "Don't Translate" and it's not limited to "copy".

This is quite annoying because every time you save a composite product on the original language, you have to go through all translations and update them via the Translation Editor, to have the default options re-appearing.

September 19, 2019 at 2:08 pm #4605903

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

I think that the _bto_data should remain in the 'Copy' state.

I'm sorry for the inconvenience that this issue is causing you.
When I have news about this issue from our compatibility team, I'll keep you updated here.

Thank you for your patience.

September 19, 2019 at 2:14 pm #4606001

George L.

On a different ticket, we established that they should be changed to "Don't Translate".

See https://wpml.org/forums/topic/composite-product-component-translations-are-lost-when-saving-original/

It sounds easier to fix the logic for this thread, than switch to "copy" and have to fix the other bug.