Home›Support›English Support›[Escalated to Compatibility team] We found an issues using acfml plugin saving page options with translation preference set to copy/co...
[Escalated to Compatibility team] We found an issues using acfml plugin saving page options with translation preference set to copy/co...
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.
Hi, we found an issue that cause the wrong escape value saving option pages using acfml (wpml-acf) plugin.
When the field is set to copy or copy-once the script workflow does not consider the unscape needed before save other languages.
In the file acfml/classes/Options/EditorHooks.php this is the fix we need.
Using wp_unslash before the option value save.
Welcome to WPML support. Thank you for providing the information.
Unfortunately, it is not possible for us to give code suggestions that way, as each small change might have implications for other parts of the code.
We have a code testing system that needs to go through a piping process, and if it is not validated, the code change is rejected.
That is why our development team envolvment on this is necessary, and to do that, we need to replicate an actual issue lacking of the check you mentioned causes, so then I can report this alongside your code suggestion.
May I ask you what the side effects will be and how to replicate the problem so I can report?
I created a clean installation of WordPress and installed and registered WPML Multilingual CMS, WPML String Translation Advanced Custom Fields Pro, and Advanced Custom Fields Multilingual plugins.
You can access the dashboard here: hidden link
May I ask you to replicate the issue and tell me the steps to check?
Thank you Christopher
I created the Option Page with a simple textarea and use the get_field in the frontend to write the content in the head. In the screenshots attached you can find the EN page (default locale) that works and the Espanol page that is broken.
The filed is saved only once in the main localization and in others locales is saved wrongly escaped into the DB.