![](https://secure.gravatar.com/avatar/5ecaf8d2265707117eceb9dc23f2f274?s=80&d=mm&r=g) vitaliiO
|
I've created 2 new pages: test-page-1 and test-page-2. Did all the steps and the link still points to main language. Link in previous message is acf link field, which is children of block, that is childern of Flexible Content
|
![](https://secure.gravatar.com/avatar/899221c714f64e640c29afdbfdfff58c?s=80&d=mm&r=g) Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Hi,
I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the site to investigate the issue further.
The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.
IMPORTANT
Please be sure to back up the site and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.
The private reply form looks like this:
hidden link
The next time you reply, click on "I still need assistance".
Video:
hidden link
Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.
Best regards
Andreas
|
![](https://secure.gravatar.com/avatar/899221c714f64e640c29afdbfdfff58c?s=80&d=mm&r=g) Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Your field groups are not configured correctly.
Repeater Fields, Groups, and Flexible content fields need to be set to "Copy once" or "Copy".
All your fields are set to "Not translate".
As long as a field is set to "Not translate", nothing will happen if you translate the page. You need to set the link fields to "Copy" to copy the link or to "Translate" to translate the link.
Please follow this guide to set up the fields:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/
Copy > The field value will be copied every time you translate content
Copy once > The field value will only be copied once (use this only if you translate posts or pages with the WordPress Editor)
Translate > The field will be available inside the translation editor for translation
After making changes to the fields you will need to edit the fields again on the original page, save the page, and then open the translation editor.
|
![](https://secure.gravatar.com/avatar/5ecaf8d2265707117eceb9dc23f2f274?s=80&d=mm&r=g) vitaliiO
|
Hello,
Here’s what I did:
1. Set a "Flexible Content" field to "Copy".
2. Within the "Stats Banner" (a flexible content block), the "Colour Box" group and the "link" field inside it were set to "Copy".
3. Created a new page: "weekend-test-page" (hidden link) and translated it.
4. Created another page: "weekend-test-page-2"(hidden link), added the "Stats Banner" block, and selected the first page in the "link" field.
5. Saved the changes.
6. Created a translation for the second page using the Advanced Translation Editor. The "link" field did not appear in the editor, which is expected based on your previous explanation:
"This is why the link field is set to 'Copy' by default and does not appear in the WPML Translation Editor. In this case, it should automatically use the translated URL if the linked page is translated and published."
So I expected the link to the first page to be automatically changed to the French version after translation.
However, after translation, the link still points to the original language version instead of the translated one.
|
![](https://secure.gravatar.com/avatar/899221c714f64e640c29afdbfdfff58c?s=80&d=mm&r=g) Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
We do have a known issue for this use case which is already escalate to our development team.
Please take a backup of your site incl. database and try to apply the following workaround:
Workaround
Edit wp-content\plugins\acfml\classes\class-wpml-acf-blocks.php go to line 191 and replace
private function get_text_type( $text ) {
$type = 'LINE';
if ( is_array( $text ) ) {
$type = 'array';
} elseif ( strip_tags( $text ) !== $text ) {
$type = 'VISUAL';
} elseif ( strpos( $text, "\n" ) !== false ) {
$type = 'AREA';
}
return $type;
}
with
private function get_text_type( $text ) {
$type = 'LINE';
if ( is_array( $text ) ) {
$type = 'array';
} elseif ( strip_tags( $text ) !== $text ) {
$type = 'VISUAL';
} elseif ( strpos( $text, "\n" ) !== false ) {
$type = 'AREA';
} else if (preg_match('/^(?:https?):\/\/\S+/i', $text)) {
$type = 'LINK';
}
return $type;
}
|
![](https://secure.gravatar.com/avatar/5ecaf8d2265707117eceb9dc23f2f274?s=80&d=mm&r=g) vitaliiO
|
I've made changes to this file:
dev.polarisagency.com/wp-content/plugins/acfml/classes/class-wpml-acf-blocks.php
You can see the changes in the screenshot.
I repeated all the steps by creating two new pages and adding a link from the second page to the first. However, the link still points to the main language.
|
![](https://secure.gravatar.com/avatar/899221c714f64e640c29afdbfdfff58c?s=80&d=mm&r=g) Andreas W.
Supporter
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
You are using a version of ACF PRO that was released in November 2023.
Also, WPML and our addons are outdated.
Please update all plugins and then test again.
|
![](https://secure.gravatar.com/avatar/5ecaf8d2265707117eceb9dc23f2f274?s=80&d=mm&r=g) vitaliiO
|
Hi, I updated the WPML, WPML addons and ACF Pro plugins, created two new pages again, translated them, and the links still point only to the main language.
You can try creating two new pages yourself and following these steps.
|