Skip Navigation

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 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 16 replies, has 0 voices.

Last updated by vitaliiO 1 day, 10 hours ago.

Assisted by: Andreas W..

Author Posts
February 7, 2025 at 2:37 pm #16680225

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

February 7, 2025 at 4:27 pm #16680626

vitaliiO

help me

February 7, 2025 at 10:03 pm #16681351

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

February 7, 2025 at 10:57 pm #16681404

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.

February 8, 2025 at 1:38 pm #16682319

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.

Screenshot_2.png
Screenshot_1.png
Screenshot_5.png
Screenshot_4.png
Screenshot_6.png
Screenshot_7.png
Screenshot_3.png
Screenshot_9 (1).png
Screenshot_8.png
February 8, 2025 at 4:04 pm #16682638

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;
	}
February 8, 2025 at 4:48 pm #16682720

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.

Screenshot_11 (1).png
Screenshot_10.png
February 8, 2025 at 5:02 pm #16682793

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.

February 9, 2025 at 1:44 pm #16684086

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.

Screenshot_13.png
Screenshot_12.png