Background of the issue:
I am trying to have the Theme Settings display data correctly for each language after updating WPML plugins. I encountered an issue where the Theme Settings show data for all languages on the same page instead of just the current language. Additionally, when I update theme settings, I get an error in ACF PRO: Uncaught TypeError: Illegal offset type in isset or empty in public_html/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php:783. Please let's have a conversation with anydesk.
Symptoms:
Theme Settings display data for all languages on the same page instead of just the current language. Error in ACF PRO: Uncaught TypeError: Illegal offset type in isset or empty in public_html/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php:783.
Questions:
Why are the Theme Settings displaying data for all languages on the same page?
How can I fix the error in ACF PRO after updating WPML?
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+01:00)
Please make sure to delete all field groups from the German and Italian versions completely. Simply disabling them won’t be enough—please remove them from the trash as well.
Once they are deleted, go to: hidden link
Then, set the following options:
- Options Pages (acf-ui-options-page)
- Field Groups (acf-field-group)
Set both to "Not translatable," as we should have only one version of each field group.
Regarding the missing data, I see that these fields are now empty. Unfortunately, due to improper translation settings for both the field groups and theme options, I can't determine when they were deleted.
At this point, the only options are to manually re-create and translate them, or if possible, restore the website to a previous state before these changes were made. This would allow us to review the setup and update our plugins in a testing environment.
I've managed to save theme settings in secondary language eventually.
But still, when I'm looking at theme settings in secondary language I see values of default language (in the site pages I see correct values), and then if I save it the default language values will be saved! what can I do?
Another thing: when duplicating a post to another language I want the permalink to be like the default language. I added logic in save_post to make the url use only the beginning of the title, until the first space. In default language it's like that, but when duplicating - it creates the link out of the whole title. how can I make it use the same permalink like the default language?