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: Compatibility
This topic contains 14 replies, has 3 voices.
Last updated by hayesP 1 year, 10 months ago.
Assisted by: Mohamed Sayed.
Author | Posts |
---|---|
July 7, 2023 at 5:11 pm #13969681 | |
hayesP |
We have some pages made up of reusable blocks made with ACF fields that we want to translate. Some fields need to be copy and others copy once, and we have set the ACF fields appropriately as described on https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/expert-translation-option/#translating-fields-in-wordpress-editor. We also need to use the default WP editor because we are going to be importing translations. But every time that we attempt to translate the page we only get a blank WP editor with no blocks. We do have the option to copy in the content from the English version and it does this correctly, but the fields that we would like to be copy are completely editable and not syncing with the English version. Is there a way to get the ACF field translation settings to work for blocks? |
July 9, 2023 at 10:13 am #13972525 | |
Osama Mersal WPML Supporter since 02/2020
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+03:00) |
Hi, Thanks for contacting WPML forums support. I'll be glad to help you today. First of all, sorry for the late reply due to a higher workload. I would need a site snapshot if possible. If you already know how Duplicator works. (http://wordpress.org/plugins/duplicator/), ★ Duplicator Instructions (hidden link) Send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big) I will enable your next answer as private, so you can provide me with the information securely. Please share the steps to reproduce the issue. Best regards, |
July 17, 2023 at 7:06 pm #14053157 | |
hayesP |
We do still need help with this, but have to check with our client what we can give you access to. |
July 18, 2023 at 7:44 am #14055433 | |
Osama Mersal WPML Supporter since 02/2020
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+03:00) |
Hi, Sure, please take your time and let me know when you can provide a copy of your site to test the issue. Best regards, |
July 27, 2023 at 6:57 pm #14113283 | |
hayesP |
We have a shell site with testing data and fewer plugins where we have reproduced this issue. If you will let me post another private message, I can now provide a Duplicator backup of this shell site. |
July 27, 2023 at 7:23 pm #14113487 | |
Osama Mersal WPML Supporter since 02/2020
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+03:00) |
Hi, I've enabled the private reply. Please share the duplicator package and let me know the steps to reproduce the issue. Thanks, |
July 27, 2023 at 8:54 pm #14113793 | |
Osama Mersal WPML Supporter since 02/2020
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+03:00) |
Hi, Thanks for the package. I installed it and tried to replicate the issue but couldn't. (Kindly check this hidden link) Please note that I changed the field group translation mode to "Same fields across languages". Would you please provide a screen-recorded video while reproducing the issue? Thanks, |
July 28, 2023 at 2:28 pm #14117967 | |
hayesP |
As you said in your response, you changed the field group translation mode to "Same fields across languages" from "Expert". This causes all fields to be set for translation, which is what we do not want. As stated in the original question, "some fields need to be set to copy and others set to copy once". The client wants some fields to not be translatable and instead sync when they are changed in the original English version of the page. "Same fields across languages" does not allow for this. The correct translation settings were assigned to the fields in the provided package. For example, on the Content tab the Title, Copy, Link Label, and Link URL are copy once and Video URL, Multiple CTAs, and CTAs are copy. |
July 29, 2023 at 9:46 am #14120811 | |
Osama Mersal WPML Supporter since 02/2020
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+03:00) |
Hi, I reinstalled the package, duplicated the page without any changes, and the block was copied correctly. (Kindly check this hidden link) Would you please provide a screen-recorded video while reproducing the issue? Best regards, |
July 31, 2023 at 1:05 pm #14127541 | |
hayesP |
As was stated originally "We do have the option to copy in the content from the English version and it does this correctly, but the fields that we would like to be copy are completely editable and not syncing with the English version." Your example video does not show the fields that are set to "copy". In other places, the fields that were set to copy often have a lock icon next to them and are sometimes even disabled. None of the reusable block fields either show the lock icon nor are they disabled. Additionally, we can edit the French version of these fields separately from the English version of these fields. This is not what we want to do. We want the fields set to "copy" to only be editable in the English version of the page, and the French value to sync with the English value. This is how fields set to "copy" work in other places, and is how the setting of "copy" is described in the WPML documentation. |
August 1, 2023 at 1:30 pm #14134703 | |
Mohamed Sayed |
Hi, Osama will be away for a few days, so I will take over your ticket. I hope this is ok with you. I tried the same steps with another field group for posts and it works as expected. The fields set to "Copy" are synced across languages and can be edited only from the default language as you can see here: hidden link I think this could be the expected behavior when adding the fields inside ACF blocks. Please check the reply from our developers on a similar ticket here: https://wpml.org/forums/topic/when-we-change-an-acf-value-from-within-a-gutenberg-block-it-doesnt-sync-with-other-languages/#post-7713937 I'm consulting our developers to confirm that and will update you once I get their feedback. Kind regards, |
August 1, 2023 at 1:53 pm #14134899 | |
hayesP |
Hi Mohamed, That behavior with copy does work in other places as you have noted, as we have seen it working on ACF fields assigned directly to a post object. We would like it working that way on reusable blocks as well. The "Expert Option" section of the "Translating ACF Blocks With WPML" documentation page (https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/translating-acf-blocks-with-wpml/#acf-blocks-expert) simply links to the same Expert translation option page that was linked to in the original question and also worked for setting up the translation settings on the ACF fields assigned directly to post objects, leading us to believe that the translation settings would also be correctly applied to the reusable blocks. The similar ticket that you linked is over 2 years old and so is not visible to us. |
August 1, 2023 at 2:16 pm #14135167 | |
Mohamed Sayed |
Sorry, the ticket I shared was archived. You can check it again now: https://wpml.org/forums/topic/when-we-change-an-acf-value-from-within-a-gutenberg-block-it-doesnt-sync-with-other-languages/#post-7713937 It might be a bit different from the case you have as in the old ticket the values were not copied, but it describes why the translation preferences of the fields inside ACF blocks behave in a different way from the ones assigned directly to posts/pages. I'm still waiting for a reply from our developers to confirm if this is still the expected behavior or if we have a workaround to make it work for blocks. I will update you here soon. |
August 1, 2023 at 8:32 pm #14137575 | |
Mohamed Sayed |
Hi, I got the reply from our developers, they confirmed that it's the expected behavior for the fields added in ACF blocks. This is because if the values are locked in the block editor, anyone can switch to the "Code Editor" and change them. Please check here: hidden link So I'm afraid that there is no workaround to achieve this. Kind regards, |
August 2, 2023 at 1:22 pm #14142787 | |
hayesP |
This is not the answer that we were hoping for, but we understand. You may want to update your documentation, as this situation is not only undocumented but implied to be working differently. |