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.

Our next available supporter will start replying to tickets in about 6.77 hours from now. Thank you for your understanding.

This topic contains 44 replies, has 2 voices.

Last updated by przemyslawP-15 6 months, 3 weeks ago.

Assigned support staff: Alejandro.

Author Posts
October 8, 2021 at 9:24 am #9746413

przemyslawP-15

Hi,
We are creating a new website. I've installed your plugin and I met some problem. There is something wrong with ACFML. I can see the bug on the front:
'Notice: Array to string conversion in /home/laboprint/web/public/pub/wp-content/plugins/acfml/classes/class-wpml-acf-blocks.php on line 153'

And moreover when I go to Advanced custom fields I can see many red exclamation marks with information like on screenshot (attached).

Could you please help me with this problem? Maybe should I change something in settings?

Best regards

acf.jpg
October 9, 2021 at 3:18 pm #9752681

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hello!

1) Let's start by meeting WPML's minimum requirements:

Please add the following code in your wp-config.php file, right after the database information lines of code:

define('WP_MEMORY_LIMIT','128M');

2) Please read this ACF guide before continuing: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

3) The red marks appear because the acf fields are not correctly setup.

as a rule of thumb you'll want to use "copy" for layout fields, images or other images that don't need to have different values between the languages.

the rest can be set to translate.

4) can you let me know if you'll translate the page manually or using a translation editor? this will help me understand how to advise, moving forward.

Regards.

October 11, 2021 at 8:38 am #9757779

przemyslawP-15

Hello,
thank you for your support.

1) done

2) I did but not everything is clear for me

3) I would like to translate almost all values of fields (ex. on homepage, footer etc.) but I don't want to translate the names and codes these fields which I can see in admin panel. So what settings and where should I use? And what with this error on the front (screenshot attached)?

4) I will translate the page manually

Best regards

wpml-acf.JPG
October 11, 2021 at 10:09 am #9760553

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hello!

Let's do this, so i can offer you a more detailed support:

- Allow me access to your site through the credential fields i have enabled for you
- Point me to one of the pages that have already been setup in the ACF part (acf's are populated)

- let me know the fields you want to have in the other language that DO NOT REQUIRE to have a different setting or value

- I'll check it out and let you know what to do, so you can better understand what to do moving forward.

October 11, 2021 at 10:38 am #9760939

przemyslawP-15

The most important thing is to fix that error on the front of website. For which credentials do you want me to give you the access?

October 11, 2021 at 11:35 am #9761389

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

1) Before you give me access, please update ACFML to version 1.9.3

2) If you have debug.log enabled, make sure WP_DEBUG_DISPLAY is set to "false" otherwise you'll keep seeing those notifications.

3) I'd need WordPress access (admin if possible, since i'll need to check many things on the site), and a link to a page where i can see the problem. i have re-enabled the credential fields again, valid only for this next reply.

October 11, 2021 at 3:16 pm #9763977

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

The notification seems to be a temporary visual glitch, but i wonder, how did you set the translation preference? i changed one manually and it worked without issues.

However, about the notification, i'm not entirely sure what part of the block is triggering this issue, but can you try checking if the problem goes away if you have a very specific block configuration removed?

maybe you can import ACF and those blocks here: hidden link

I can check if we get the same error over here as well.

October 12, 2021 at 6:26 am #9767469

przemyslawP-15

What do you mean saying "very specific block configuration removed" What do you want me to remove?
Generally the translations are working fine but I'm worried about the issues which I showed you (on the front and in admin panel that red marks). That info says that something is wrong. I would like to solve the problem right now. I don't want to find out that's something wrong when I finish building the website.

October 12, 2021 at 10:10 am #9769959

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

1) When you create a block in ACF, you create it pretty much like a normal ACF field group, correct?

so that field group will contain different fields. well it seems one of those fields is creating the notification you're seeing.

if you delete one of those fields and the notification stops showing, it means that there is something wrong with the field and our plugin, so we would like to investigate that and to investigate the problem we need to have a way to recreate the problem.

2) the red mark seems to be a visual bug, and i'd like to know how you configure the translation preference of all the fields, since when i change it manually to any setting, the "warning" icon goes away.

that warning icon is there when you initially open a field group with ACF fields on them, and they are still not configured to work with WPML, but as soon as you manually configure the different fields, it would go away.

so, how did you configure the different ACF fields? through a JSON, manually, through Code, etc?

October 12, 2021 at 12:40 pm #9771533

przemyslawP-15

I've been testing fields and found a few which cause the issue. It comes to repeating fields which are used in Gutenberg blocks placed in the widget area. Ex. fields group: footer and fields inside: Address, Products menu - Menu 1 and Menu 2, Info links

October 12, 2021 at 1:01 pm #9771713

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Ok, could you then create a block with the settings that create this notification, here: hidden link

That way, if we can recreate it on this sandbox site, i'll be able to send it to our developers so we can have a fix for it.

October 12, 2021 at 1:31 pm #9771935

przemyslawP-15

I am not able to do it because there is no ACF PRO extension. I've installed free version of ACF and started to create it but I've noticed that there is no block options (this option causes the issue - I mean the repeating fields in case of block location)

October 12, 2021 at 2:34 pm #9772619

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Yes, you need to install ACF Pro, and add the block and a configuration that created issues so i can send it to our developers.

Don't worry about the license, we can work without it (we are Partners with ACF and we can contact their devs when and if needed).

October 13, 2021 at 6:43 am #9776617

przemyslawP-15

So if you are Partners with ACF and you offer plugin compatible with their plugin you should have it at least for testing, shouldn't you? Ok, I will try to do it during 1 hour. I will let you know.

October 13, 2021 at 8:24 am #9777509

przemyslawP-15

Done. You can see the same issue on your page hidden link