Skip to content Skip to sidebar

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
- 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 -
- 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 -

Supporter timezone: Europe/Madrid (GMT+02:00)

This topic contains 14 replies, has 3 voices.

Last updated by Nigel 1 year, 10 months ago.

Assisted by: Nigel.

Author Posts
September 29, 2023 at 10:09 am #14486963

Murat Gumrukcuoglu

I am trying to:
Translate post

I expected to see:
Translated post

Instead, I got:
The page wasn't translated.

see for more info following video:
hidden link?

October 1, 2023 at 2:54 pm #14493409

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

I will add the first reply before this ticket is assigned to one of my colleagues.

First thing, kindly update WPML and WPML string translation plugins to the latest version:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to "WordPress Dashboard > Plugins > Add new > Commercial (tab)".
- Click the "Check for Updates" button.
- Update WPML and its addons there.

For more information:
https://wpml.org/faq/install-wpml/#automated-updates

After that, please do a test by changing something on the main language page and try to re-translate. In the video, you only changed the translation and not the original page content.

Finally, please check and tell us what is the translation preferences for the TEXT BODY Advanced Custom Fields field in ACF > Field Groups.

Thanks.

October 2, 2023 at 1:34 pm #14498401

Murat Gumrukcuoglu

Hallo Christopher,

we change translation of the turkish page, then we open page and change language to turkish.

We should see the correctly translated text there.

ACF fields are used Expert translation set, and fields are set to translate option.

October 3, 2023 at 10:25 am #14503379

Nigel
WPML Supporter since 02/2016

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

Hi there

Let me see if I can help you.

Would it be possible to get access to your site so I can check the original page and go through updating the translation myself to see exactly what happens?

Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

Can you also confirm the url of the page you are translating?

October 3, 2023 at 4:02 pm #14507259

Nigel
WPML Supporter since 02/2016

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

I logged in to your site.

I want to be careful as it is a live site, so can I get some more information from you.

When editing posts it's not the normal editor, the content section appears to be replaced by a "Body text" block that has sub-sections.

Where is that from?

Your theme? A plugin? Custom coding?

October 3, 2023 at 5:27 pm #14507957

Murat Gumrukcuoglu

Hallo Nigel,

we use gutenberg editor, with custom made blocks based on ACF.

for every custom gutenberg block we use ACF fields..

October 4, 2023 at 10:04 am #14511559

Nigel
WPML Supporter since 02/2016

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

OK, can you confirm if you have prepared the custom blocks for translation as described in this document?

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/translating-acf-blocks-with-wpml/

If so, can you let me know where you have added the code to register your custom blocks?

I'll want to take a closer look and possibly set up a test site that uses your custom block so I can go through the steps of translating content made with it.

October 5, 2023 at 6:18 am #14516793

Murat Gumrukcuoglu

Hallo Nigel,

we use following code to add blocks:
https://pastebin.com/qyVg553K

then within the ACF we add goup to the block, see attached screenshot.

Schermafbeelding 2023-10-05 om 08.18.03.png
October 5, 2023 at 9:21 am #14518625

Nigel
WPML Supporter since 02/2016

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

Thanks for that. The block is registered with code, but the ACF fields are added within the UI, not registered programmatically.

I tried a test translation of a draft blog entry, and the initial translation worked as expected, but then when I went to edit the translation, the updated title was preserved but the updated text was not.

The user you have created for me doesn't seem to be an administrator, I cannot see the UI for ACF in the back end to review the settings.

Is it possible to change that?

October 5, 2023 at 9:31 am #14518851

Murat Gumrukcuoglu

Hallo Nigel,

i'm not sure why but it's indeed invisible there although you have an administrator role.

You can try to access that directly with the following link: hidden link

October 5, 2023 at 9:55 am #14518981

Nigel
WPML Supporter since 02/2016

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

That worked, thank you.

The earlier screenshot you shared of the field group was for the wrong field group (assigned to the block BG Image and Text, the actual block in question is Body text).

Looking at the correct field group and comparing it to the field group you shared does highlight what I think is the problem, though.

The field groups contain fields with the same names (generic field names like title, and text).

In the screenshot I'm highlighting a warning from the documentation I linked to before. (The problem that arises is not exactly the same as warned of, but I think the cause is the same.)

I suggest you review the fields in your field groups to ensure they have unique field names. I suspect you will have to re-save posts before translating them.

Can you please try that and let me know how it goes.

Screenshot 2023-10-05 at 10.52.01.png
October 5, 2023 at 10:09 am #14519227

Murat Gumrukcuoglu

Hallo Nigel,

if we are to change all the fields to have unique names will it affect current translations ?

October 5, 2023 at 10:20 am #14519427

Nigel
WPML Supporter since 02/2016

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

I'm not sure, so I'm asking the ACF specialists in our compatibility team.

But in the meantime I'd recommend you have a staging site prepared where you can try this before attempting the same on your production server.

October 5, 2023 at 10:29 am #14519455

Murat Gumrukcuoglu

Hallo Nigel,

if we use same block more than once will it not be leading to the same problem ?

Example:
header block.
body text block.
body text block.
faq block.
body text block.
Shortcode block.

October 5, 2023 at 10:46 am #14519547

Nigel
WPML Supporter since 02/2016

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

That's not going to be a problem.

I have some clarification from my colleague.

The issue when using the same field name for different fields across different field groups only relates to saving the translation preference.

If you have different translation preferences for the same field, whichever one happened to save last will apply to all of them.

I can see that the Block: Accordion field group contains a "title" field, whose translation preference is set to Copy, while in other field groups the same field is set to Translate, so that is not going to work correctly everywhere.

You have a lot of field groups so I didn't go through checking them all, but you should review them and double-check that where you have re-used the same field name across different field groups, that they all have the same translation preference.

If some of them should have different translation preferences, then you will need to re-name the fields.

That should not have any effect on your actual content (original or translated), but will affect what happens during translation.

Pay particular attention to the "text" field, which seems to be the one causing trouble in my testing.

The topic ‘[Closed] Post is not translated.’ is closed to new replies.