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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | - |
- | 19:00 – 22:00 | 19:00 – 22:00 | 19:00 – 22:00 | 19:00 – 22:00 | 19:00 – 22:00 | - |
Supporter timezone: Europe/Paris (GMT+01:00)
This topic contains 15 replies, has 3 voices.
Last updated by George Botsev 5 years, 2 months ago.
Assisted by: Yvette.
Author | Posts |
---|---|
September 27, 2019 at 4:06 pm #4655741 | |
George L. |
It appears that if you try to edit a product in the wrong language, the links from that product are broken. For example, if you have Product 1 in English and Translation 2 in German, if you try to edit product 1 using /wp-admin/post.php?post=1&action=edit&lang=de the translation link is broken, which causes multiple side effects. Steps to reproduce Expected results Actual results Why this is bad How to resolve Side effects p.s. I have not tried with other post types, but i see no reason why this bug wouldn't affect any post type. p.s.2 I cannot provide a duplicator package or a dump of our database. This is not necessary however as the issue can be reproduced on vanilla installtion of WPML. |
September 27, 2019 at 10:35 pm #4656807 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Hello I understand the case you explained to be the following: - user profile setting is enabled - A product is trnalsated to 2 languages I was unable to reproduce this in a fresh installation of WPML/WCML/Woocommerce Here, you can use the following link to edit an original language (EN) in the 2nd language (ES). The translation links are not broken. hidden link If you are able to reproduce the error, can you please let me know? |
September 28, 2019 at 6:49 am #4657957 | |
George L. |
Hi Yvette, I did not make any changes to the staging you sent me. I just visited the products you made and noticed the folllowing On /wp-admin/post.php?post=32&action=edit&lang=en On /wp-admin/post.php?post=98&action=edit&lang=es Hope this clarifies the issue |
October 1, 2019 at 6:23 am #4668869 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Thanks - I´m looking at this now. I appreciate your patience |
October 1, 2019 at 9:44 am #4670529 | |
George L. |
Right, so there are a few different issues here. 1. The translations get unlinked. Issue #2 is happening if you do the following The first time you load product #32, the UI is in Spanish. If you refresh, the UI changes to English. This works the other way round too, so if you do steps 1 & 2 the other way round, you'll get the UI in English initially, then Spanish after you refresh the page. I imagine you use the _icl_current_admin_language_ cookie instead of the lang variable on the URL to decide the language of the UI |
October 1, 2019 at 12:12 pm #4671929 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Alright. THanks for that - I was able to reproduce reliably. I´m prepping the escalation now. |
October 1, 2019 at 2:27 pm #4672935 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Hello I´ve gone ahead and escalated this to our 2nd tier group. I believe this has to do with the difference between "object language" and "session language" and specifically what the "lang" URL parameter is actually referring to. In any case, the result should not be disconnected objects - let´s see what the 2nd tier group finds out. |
October 14, 2019 at 2:57 pm #4751295 | |
George Botsev Supporter
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Hello! Instead you should delect the option "Assume that the original language of all strings is English" in WPML > Theme and plugin localization That should make the profile of yours, if it is set to Spanish to display the proper translations when you edit the page and not to switch the language. |
October 14, 2019 at 3:04 pm #4751311 | |
George L. |
Hi George, This setting is/was enabled, yet the issue occurred. Can you please try the steps I've given you and confirm if your solution actually works? To clarify, what I described is an edge case scenario, but unfortunately affected us and the plugin didn't work as it should. |
October 15, 2019 at 8:12 am #4755331 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Hello I was reading through George´s notes and I think there is a typo in his response to you. His working notes say the following: "It seems that the problem was because "Assume that the original language of all strings is English" was set! So, please read his response with "de-select". If you still experience the issue, I will ask him to take another look. |
October 15, 2019 at 8:43 am #4755487 | |
George L. |
Thanks, this solution partially fixes the issue. The UI no longer changes language when i set my default editing language to EN and deselect the "Assume..." option. The issue with the unlinked translations remains however! So if you save any product while being on the wrong "lang", the translations become unlinked. For example, if i visit /wp-admin/post.php?post=123&action=edit&lang=de where the default language is EN and a DE translation exists, when i save, the translations are unlinked. |
October 15, 2019 at 9:00 am #4755675 | |
George L. |
Also, slightly off topic, but is there an ETA for the versions you currently have in Beta? I've asked in the relevant blog post but my comment hasn't been approved (or answered) yet |
October 16, 2019 at 9:19 am #4764015 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
OK - let me pass on your comments to George and see what he can respond about your observations. |
October 16, 2019 at 9:25 am #4764045 | |
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Hello again. I was reading through the messages and I do see that George wrote: "The parameter should not be changed like you do. Unless I am mistaken, it appears that this behaviour will happen if you use the URL language parameter as you do. It is not intended to have this use. From you last message, it sounds as if you are still attempting to use a URL language parameter. |
October 16, 2019 at 9:39 am #4764201 | |
George L. |
Correct. I did explain my reasons for that. To give you another example, imagine you need to make a tiny change across a big list of products (let's say 100), but not all products in your inventory. Also, assume you use a large site with hundreds of thousands of orders. WPML is not optimised well enough (hopefully things will improve with your changes currently in beta). If you try to go to the products list page, search for a product, then open it, it'll take minutes just to get to a single product. Instead, you can be given a list of product IDs and be asked to make the change. This is quite common and we've done it multiple times in the past for various reasons. What's the way of accessing those products? Simply replace the product ID on the URL. As it's still permitted to translate products without WPML's translation editor I see no harm in editing translations that way. Unless you are given the list of IDs broken down by language (harder to do, and more likely to forget), you're gonna end up unlinking the translations. If WPML "recommends" its translation editor, then the above steps are perfectly valid and WPML should not act that way. If WPML "enforces" its translation editor, then you should prevent users from accessing translated products that way (or redirect to the right place). Even though you have a standard way you work, not everyone conforms to that and there are always exceptions or reasons to do things differently. This is the main advantage of WP anyway. I, therefore, think this is a problem that needs fixing. |