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: Bug
This topic contains 11 replies, has 3 voices.
Last updated by Sumit 1 year, 2 months ago.
Assisted by: Dražen Duvnjak.
Author | Posts |
---|---|
September 6, 2023 at 2:58 pm #14353443 | |
pierreB-13 |
I am trying to: Link to a page where the issue can be seen: Post in isolated dev env: hidden link Feel free to test everything in this test setup. I expected to see: Instead, I got: More Information: I've setup an isolated testing environment with only WP + ACF + WPML + ACFML in their recent versions and demonstrate the issue here in more detail in this 5min video: It seems to be a reappearing bug that we reported 2 years and thought to be fixed (maybe was) in ACFML 1.9.0. From ACML Changelog: Also seems to relate to this Errata that is marked as "resolved" with 1.9.0 (but isn't): Thanks for checking. |
September 8, 2023 at 6:50 am #14363727 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello Aaron, thanks for contacting us and sharing the detailed report. I was able to confirm the bug and have escalated this issue further. I will update you when I have more news. Regards, |
September 11, 2023 at 8:47 am #14373691 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, our 2nd tier and ACFML developers checked, and it is not a bug as per us. In such cases when you wish to use different values in 2nd language and use a native WordPress editor you should use the TRANSLATE option. Regards, |
September 11, 2023 at 2:44 pm #14377459 | |
pierreB-13 |
Hi Drazen Switching the fields translation setting to "translate" would mean a very different behavior since it would mean that all initial content needs to be copied over manually which hardly is an option. All of our customers always start with the original language as initial content, but then modify / translate that. That is also the behaviour of "copy once" as described on your documentation page: This is exactly what we would want and also how it works for all fields that aren't empty in the target/translated language. Only if a field is empty in the secondary language version of a post the values gets carried over again if the target/translated post is updated. As you can also see from the Changelog of ACFML 1.9.0 this seems to be a Bug that was previously fixed and came up again: Could you please recheck? Thank you, |
September 12, 2023 at 6:12 am #14380297 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello Aaron, I understand your point, and I have already checked with our ACFML devs, not just 2nd tier. It was fixed when using the WPML editor for translation, but for the WP editor behavior is different and we suggest setting it to Translate not Copy once, and that is the correct way to use it. What our docs say is related to when the field has values to be copied, not when an empty field needs to be synced. Anyway, if you still wish to use Copy once, the old workaround with adding blank space still works and you can use that one. Hope you understand. Regards, |
September 12, 2023 at 8:13 am #14381295 | |
pierreB-13 |
Hi Drazen I find it very hard to follow along your / the dev teams argumentation: Why should "copy once" behave differently if there's a value in the target language's field than when that is empty? The behaviour seems inconsistent and intransparent: Why would the term "once" suddenly mean "always"? That seems very misleading to me 🤷🏻♂️ The whole idea behind the terminology seems to me that it is about only being copied one time, on first duplication / translation of the page...and after that nothing would ever happen with the target field. Which is also how it works as expected with non-empty fields. Sorry to be so persistent on this issue, but WPML is really going to stick with that choice? I would urge you to clarify this again with the product / dev team. From my perspective (as a dev and also as editor of several websites using WPML) that would not be a standpoint I can reproduce. It definitely (and to me obviously) leads to more posts containing unwanted and wrong content, which will often only be realisied later on if the final published post is thoroughly checked. Thank you for a final comment on this. |
September 12, 2023 at 8:19 am #14381347 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello Aaron, I have shared your reply with our 2nd tier and ACFML dev, we will update you soon. Regards, |
September 12, 2023 at 9:49 am #14382363 | |
pierreB-13 |
@Dražen Thanks a lot, that is appreciated 👏🏻 |
September 12, 2023 at 4:17 pm #14385375 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, I am Sumit from 2nd tier support. I understand your concern and let me explain to you what is happening here. Our copy-once feature works only when creating a new post and there is no value in the translated post meta even the empty one. In ACF, ACF saves the empty values in post meta as soon as translation is added even before WPML can copy the value. WPML sees there is an empty value so it does not copy the values. But after it we got another problem when the user saves the empty value the copy-once is triggered. To fix this we added another fix to check the previous value If this was empty trigger the copy once if there was a non-empty value and intentionally being cleared halt the copy once. We decided not to fix it because - When using Native Editor, the recommended mode is to use different fields across the language or set the field to translate in expert mode. Because in native editor you have control over the fields of what to translate. - You can use   instead of empty value. This is almost same as an empty value. I don't deny your comment and I understand this can be improved more but this depends on workflow. A native editor is not commonly used with Expert mode instead it is used with Different fields across the language as users want to take control of the fields entirely and do not want WPML to interfere with it. However, if we see this should be improved in the future we will upgrade the logic. But for now, we have offered you the possible solution and explained the behavior differences. I hope you understand! |
September 13, 2023 at 6:09 am #14387021 | |
pierreB-13 |
@Sumit thank you for taking the time to respond to this request and explain, in detail, why you're taking that path. It's still not what we would like and causes problems in the client's editorial workflow, but I think we have no other choice than accepting it for the time being, working around it with the empty string, and hoping it might be improved in the future. I'll share some more insight into how the site setup / editor works, maybe this might show you a different way of how WP & ACF & WPML work together in this case (see screenshot attached): The editing experience we usually provide to customers is based on a main "page Components" ACF flexible content field (hidden link). This offers the customer a set of pre-built components that each page can be flexibly built with. So the typical workflow for an editor would be: Using the Advanced Translation editor doesn't really work because that would mean that translated post need to be copies of the source post; it would not allow the client to add new components / remove others from a post. Using "translatable" as a field setting would mean the editors need to make the "duplicate" of the post themselves manually to start with...which would mean quite a bit of work and is certainly not a great or efficient experience. An idea that I had to improve the situation for similar cases would be to be able to have a sort of "don't copy" / "copy once done" setting that could be set per post (programmatically, not through an interface) so that ACF would no longer try to copy the field values and would ignore the empty fields. Greetings from Switzerland 🇨🇭 and thanks again, |
September 13, 2023 at 6:10 am #14387023 | |
pierreB-13 |
Uploading the screenshot didn't work with me previous post...so here it is again. |
September 13, 2023 at 7:13 am #14387279 | |
Sumit Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi,
To avoid mixing the workflow we decided to introduce new modes https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#selecting-a-translation-option in which you choose "Different fields across languages" if you want to have a different layout. We were allowing customers to set the translation preference for each field and that was causing issues so we decided to give two simple options only the same fields or different fields. Here I would suggest keeping the "Different fields across languages" and when you translate the post in this mode, ACF will copy the fields (The Layout field that you want) for you on first time and then you can modify them. Please let me know if this works for you. Thanks |