Resolved
Reported for: Advanced Custom Fields Multilingual 1.10.4
Resolved in: 2.0.0
Overview of the issue
When using ACF and WPML on a server using PHP 8.0, setting a field group to be displayed on the options page will show the following errors:
Warning: Trying to access array offset on value of type null in /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/OptionsPage.php on line 184
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/strategy.php on line 126
Please keep in mind that it is not recommended to install WPML with only one active language.
Workaround
Please be sure you have a full backup of your site before proceeding.
- Edit the file /wp-content/plugins/acfml/classes/strategy/repeater-shuffle/OptionsPage.php.
- Go to to line number 184.
- Replace:
return $this->element_translations[ $id ];
With:
return $this->element_translations[ $id ] ?? [];
Hi,
I bought WPML to translate my website. I am using the Wpresidence theme which is compatible.
My problem is: I cannot translate the advanced search bar (I used the custom search fields). The main language is Spanish, when I change the language to English and translate it, when I go and check the Spanish website it changed to English too.
I hope you can help me.
I look forward to hearing from you.
Kind regards,
Arlette
Hello Arlette,
I don’t think your issue is related to this errata. Could you please open a chat in our support forum so one of our specialists can assist you?
Thank you for your help.
Andrés