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 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

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

This topic contains 10 replies, has 2 voices.

Last updated by Bruno Kos 1 year, 9 months ago.

Assisted by: Bruno Kos.

Author Posts
October 17, 2023 at 11:48 am #14593677

pauli-7

PHP 8.2 Compatibility issue - ACFML

Hello,

We are currently migrating our main Tigercat.com website to PHP 8.2 and we are debugging and checking main Web site functionalities.
We use WPML 4.6.6 and Advanced Custom Fields Multilingual Version 2.0.5 with Advanced Custom Fields PRO Version 6.2.1.1.

So it might be of your interest to know that if we remove for example a POST Relationship and update current POST (ie: CPT Product)
we get this error (JSON).

Do you have an idea why this happens with PHP 8.2 and not with PHP 7.4?

ERROR (JSON):

{
"installName": "tigercatco1dev",
"environment": "DEV",
"type": "error",
"date": "2023-10-17T10:41:59.226Z",
"severity": null,
"client": null,
"message": "PHP Fatal error: Uncaught Error: Cannot assign an empty string to a string offset in /nas/content/live/tigercatco1dev/wp-content/plugins/acfml/classes/strategy/repeater-sync/CheckboxHooks.php:46#012Stack trace:#012#0 /nas/content/live/tigercatco1dev/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(17): ACFML\\Repeater\\Sync\\CheckboxHooks->storeSynchroniseOption(24037)#012#1 /nas/content/live/tigercatco1dev/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\\FP\\{closure}(Array)#012#2 /nas/content/live/tigercatco1dev/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPML\\FP\\Right->map(Object(Closure))#012#3 /nas/content/live/tigercatco1dev/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPML\\FP\\Right->chain(Object(Closure))#012#4 /nas/content/live/tigercatco1dev/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPML\\FP\\Promise->resolve(Object(WPML\\FP\\Right))#012#5 /nas/content/live/tigercatco1dev/wp-includes/class-wp-hook.php(310): WPML\\LIB\\WP\\Hooks::WPML\\LIB\\WP\\{closure}(24037)#012#6 /nas/content/live/tigercatco1dev/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters('', Array)#012#7 /nas/content/live/tigercatco1dev/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#8 /nas/content/live/tigercatco1dev/wp-content/plugins/advanced-custom-fields-pro/includes/acf-form-functions.php(143): do_action('acf/save_post', 24037)#012#9 /nas/content/live/tigercatco1dev/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-post.php(329): acf_save_post(24037)#012#10 /nas/content/live/tigercatco1dev/wp-includes/class-wp-hook.php(312): ACF_Form_Post->save_post(24037, Object(WP_Post))#012#11 /nas/content/live/tigercatco1dev/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)#012#12 /nas/content/live/tigercatco1dev/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#13 /nas/content/live/tigercatco1dev/wp-includes/post.php(4753): do_action('save_post', 24037, Object(WP_Post), true)#012#14 /nas/content/live/tigercatco1dev/wp-includes/post.php(4855): wp_insert_post(Array, false, true)#012#15 /nas/content/live/tigercatco1dev/wp-admin/includes/post.php(445): wp_update_post(Array)#012#16 /nas/content/live/tigercatco1dev/wp-admin/post.php(227): edit_post()#012#17 {main}#012 thrown in /nas/content/live/tigercatco1dev/wp-content/plugins/acfml/classes/strategy/repeater-sync/CheckboxHooks.php on line 46",
"uuid": "a258f5aa-26b1-4b46-a9cf-78d2e8e45ff1"
}

Thank you for your help on this important issue.

Best regards.

October 18, 2023 at 7:58 am #14599771

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Thank you for contacting WPML support!

Are able to reproduce this issue in our sandbox site?
hidden link

It has PHP 8.1, but if the issue is reproducible on PHP 8.2 and not PHP 7.4, then it is probably something specific to PHP 8 so we may not need the newest version (even though we can of course test in your exact version as well).

Regards,
Bruno Kos

October 19, 2023 at 4:17 pm #14617825

pauli-7

Hello Bruno,

I'm not sure if you're asking me to do something or not...
I've tested just now with the latest WPML version:
- WPML 4.6.7
- Advanced Custom Fields Multilingual Version 2.0.5
- Advanced Custom Fields PRO Version 6.2.1.1.

The critical error is present with PHP 8.2 but not PHP 7.4!
Our Hosting provider (WPEngine) request us to upgrade to PHP 8.2 by the end of October 2023!

* This happens when there is a relationship ACF set to no translate.
* If a relationship is present in related post with this ACF and if we try to remove it and save, * we get a critical error and site is broken.
* This POST is translated in different languages.

So what should I do to solve this problem?

Thank you for your help.

JM (working for Paul)

October 19, 2023 at 4:51 pm #14618069

pauli-7

And also I've just tried with PHP 8.0 and we get the same critical error...

Thank you for your help on this.

JM

October 23, 2023 at 7:32 am #14633499

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Ok, on this sandbox:
hidden link

Can you do the following:
- Import your field group ( or create a new one with only that relationship element)
- create a post with it
- translate a post
- show me where I can see the fatal error, at which point

I installed all the required plugins, if something else is needed by all means.

We only need a basic example, let me know if not clear to be done.

October 23, 2023 at 2:53 pm #14639517

pauli-7

Hello Bruno,

So I've been starting to create the case in your sandbox but it's hard to reproduce it as in this sandbox there are many ACF builders with layouts, repeaters and relationship which are missing. These ACF relates to custom post type you do not have either...

So! But apart from that, I was able to save a POST without critical error when I check the "ACFML Synchronize Translations" box. If it's checked there no errors and it saves the POST. If it's not checked it generates a critical error and does not save the POST!
All this on my DEV website and not in your Sandbox...

The problem is that we do not want to synchronize the repeaters or flexible fields.

As I do not have access to FTP for sandbox I cannot put the custom post types or the flexible layouts.

I'll try to create some of the ACF fields type we have on your sandbox but I will not be able to really clone the actual structure.

I'll let you know.

Thank you.

JM

2023-10-23-16-53-tigercatco1dev.wpenginepowered.com.png
October 24, 2023 at 8:22 am #14643873

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

I see, I thought it would be as simple as only importing your field groups which is matter of a few clicks and create a post and translate.

However given the complexity of your setup, an alternative would be that you provide us with Duplicator package of your website, but with media files (and other bigger files) removed.

Let me know if this would work for you and I will open a private reply.

October 24, 2023 at 10:02 am #14645739

pauli-7

Hello Bruno,

Yep that would be a good solution except that the setup is even more complex to transfer as there are APIs keys and licenses in a bunch of places.
The best would be to give you a temp access so that you could have a look. Please let me know if that's feasible?
Another thing I wanted to share with you is that as I identified where the problem is coming from "ACFML Sync" plugin, I'm not 100% sure we do require this plugin anymore as I disactivated it and the Critical error is gone.
We do not need to sync. the repeaters or flexible ACF fields across all languages!
So my question is apart from SYNC what else is doing ACFML?

Thank you for your answers.

Best regards

JM

October 24, 2023 at 10:39 am #14646355

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Do you mean this plugin https://wpml.org/download/acfml/?section=changelog or is "ACFML Sync" some other plugin?

In theory it may be possible to translate ACF built pages in the event that they are translated manually in WordPress even without ACFML, however we always tend to fix any ACFML issue.

October 24, 2023 at 11:37 am #14647035

pauli-7

This one:

Advanced Custom Fields Multilingual
Activate | Delete | Registered
Adds compatibility between WPML and Advanced Custom Fields | Documentation

Version 2.0.5 | By OnTheGoSystems | View details

2023-10-24-13-36-tigercatco1dev.wpenginepowered.com.png
October 24, 2023 at 1:05 pm #14647891

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Ok, you can then continue without it but check if the translations work properly. Because ACF is a specific plugin, that's why we created our glue plugin to ensure compatibility and easier translation.

However if you wish to proceed with debugging this, we can also go this route.

The topic ‘[Closed] PHP 8.2 ACFML Sync bug’ is closed to new replies.