Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing a PHP fatal error when trying to save an options page in Polish and German languages using WPML and ACF Pro. The error message indicates an issue with illegal offset type in isset or empty, which is not directly caused by ACF but by how WPML interacts with ACF's low-level filters.
Solution:
We have identified that removing the options

options_nl_groep_voor_sociallinks

and

options_pl_groep_voor_sociallinks

from the

wp_options

table resolves the issue. It is crucial to back up the database before proceeding with this solution to prevent any data loss. This action should stop the fatal error from occurring when updating the options pages in the affected languages.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket at WPML support forum for further assistance.

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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Itamar 10 months, 3 weeks ago.

Assisted by: Itamar.

Author Posts
August 7, 2024 at 9:23 am #16047078

maartenP

Background of the issue:
I am trying to save an options page. The site uses WPML in 5 languages, with the default being English. The issue only seems to persist when saving in Polish and German. The error I get is this: PHP Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in /data/sites/web/vanhavermaetbe/subsites/international.vanhavermaet.be/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php:726 but I don't think it is caused by a mistake in ACF's code. I already contacted ACF support, this is their response: "Please reach out to WPML for help with this. The issue is caused by them using ACF's low level filters to modify the data being sent into ACF, in theory for each language - but they're sending malformed data in some cases so ACF generates an error. We wouldn't want to fix this our side, because this error is likely preventing data loss by informing you something went wrong when initialising your data - and it would only be generated for developers using our low level functions for custom functionality." Here is a forum with the exact same issue: https://wpml.org/forums/topic/get-fatal-error-when-updating-options-page/ Here it says to revert PHP version to 7.4. In my case I can't revert to PHP 7.4 for obvious security reasons. This forum also states that the bug was reported to the dev team, are there any updates regarding this bug?

Symptoms:
A PHP fatal error occurs when saving an options page in Polish and German languages.

Questions:
Are there any updates regarding the bug reported in the forum?
Is there a workaround for this issue without reverting to PHP 7.4?

August 7, 2024 at 10:50 am #16047499

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

As I mentioned, I'm consulting our second-tier supporters and developers about this issue. Meanwhile, we are also waiting for access to your staging site where the problem occurs.

If you need further help with this, please share the access details to your site with me.
I'm enabling a private message for the following reply.

Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Regards,
Itamar.

August 8, 2024 at 4:20 pm #16053757

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

As an alternative to letting us have access to a staging site, we want to ask for your help replicating this issue. For this, I created a test website with a clean WordPress install. You can access it through this link:

hidden link

With this link, you'll be directly logged in.

I already installed ACF Pro and WPML + its add-ons.

Please configure WPML and ACF as set on your site (just the basic configurations needed to replicate the issue are enough).

Please let us know when everything is finished, and you can replicate the problem.

Important! Do not import your site to the test site. We must replicate the problem on a fresh, clean WordPress installation.

Regards,
Itamar.

August 19, 2024 at 7:39 pm #16085097

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Tim and thanks for the access details.

I can see the fatal error on your site.

I need to escalate this case to our second-tier supporters. To do so, I need to take a copy of your site and install a plugin like Duplicator or All In One Migration.

Please let me know if you agree to proceed.

Thanks,
Itamar.

August 25, 2024 at 11:54 am #16101190

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

We're still awaiting your approval to install a plugin like Duplicator or All In One Migration to take a copy of your site.

In ACF -> Field Groups, I don't see any field group for Privacy.
Am I missing anything?

Meanwhile, our second-tier supporter also suggests you check our ACF Options page guide.

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/translating-the-acf-options-page-custom-fields-with-wpml/

It seems you are using the Expert mode for the Thema filed groups. Please review our Expert mode guide here if you need to use it.

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/expert-translation-option/

Regards,
Itamar.

August 26, 2024 at 8:10 am #16102990

maartenP

Hi Itamar,

Thanks for the follow up and sorry for the late reply.

You guys have my approval to install any plugin you need!
You can also disable plugins if necessary.
If you need to change the wp-config.php to raise the memory limit for example, feel free!

Regarding the Privacy options page, these fields are programmatically added by our custom 'expliciet-privacy' plugin. But nevertheless the error persists on other options pages as well.

If you need anything else let me know.

Greetings,

Tim

August 26, 2024 at 12:26 pm #16104423

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Tim.

I took a copy of your site and escalated this case to our second-tier supporters.

We'll keep you updated on nay news regarding this issue.

I appreciate your patience.
Itamar.

August 27, 2024 at 1:41 pm #16110292

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Our second-tier supporter has debugged this issue and found that removing the options options_nl_groep_voor_sociallinks and options_pl_groep_voor_sociallinks from the wp_options fixes this problem. The fatal error would not reappear when you update the options pages in German and Polish.

**** Important! backup the DB before you proceed with those steps****

Please let me know if it works for you.

Regards,
Itamar.

August 29, 2024 at 3:17 pm #16120989

maartenP

Hi Itamar,

Wow, that did the trick!
I can now update my options without any issues.

I'm curious to know how your second-tier supporter even found this.
Because there are thousands of tables in the wp_options table.
I wouldn't even know how to debug this.
If you're helpdesk is busy you can ignore this, i'm just a bit curious :p

Thank you for the help Itamar and also send my gratitude to that awesome developer!

Greetings,

Tim