[Resolved] Apply a change in the translation setting of existing ACF field
This thread is resolved. Here is a description of the problem and solution.
Problem:
We are using WPML and ACF + the glue plugin ACFML. We initially set an image field's translation configuration to be "copy". Now we would like to be able to change the image in the translated languages, so we set it to CopyOnce. Yet the post-edit interface in the translation language post-edit screen is still locked for that image field.
Solution:
1- Deactivate all plugins except these (https://prnt.sc/B8JbDb-AdM8t)
2- Select "Different fields across languages" translation mode in the following field groups
Atom : Teaser Item
Page Builder
3- Edit the (wp-content/plugins/sitepress-multilingual-cms/classes/custom-field-translation/class-wpml-copy-once-custom-field.php) file
4- Replace the following code at line 66
We are using WPML and ACF + the glue plugin ACFML. We originally set an image field's translation configuration to be "copy". Now we would like to be able to change the image in the translated languages, so we set it to CopyOnce. Yet the post edit interface in the translation language post edit screen is still locked for that image field. What steps should be followed so that the change is taken into account?
OK, I just did it. I then updated the English post to trigger a change, but the french post still does not allow me to edit the image field.
Should i do something else to make sure the field change is applied ?
Thanks for your update. Please let me know which field group contains this image field. Also, I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed.
Your next answer will be private, which means only you and I can access it.
❌ Please backup your database and website ❌
✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Thanks for your suggestion. I tried the WP Migrate plugin, but I faced an error. (An unknown error occurred. Please check your PHP error log or contact support.)
Is it possible to install one of the plugins mentioned in my previous reply?
Thanks for your cooperation. Your site is bigger than what Duplicator Lite can handle, so I need to use the Duplicator Pro plugin. Would you please grant me access to install plugins to install the Duplicator Pro? The current provided account can't install plugins.
Thanks for your cooperation. I tried Duplicator Pro and All in one migration plugins, but both didn't work because of server restrictions, so please provide a copy of your site's files and database.
Kindly upload the package to one of the file transfer services like WeTransfer or Google Drive. I'll enable the private tab, so you can share the package link safely.
Thanks for the package. I installed a local copy of your site and was able to fix the issue by the following steps:
1- Deactivate all plugins except these (hidden link)
2- Select "Different fields across languages" translation mode in the following field groups
Atom : Teaser Item
Page Builder
3- Edit the (wp-content/plugins/sitepress-multilingual-cms/classes/custom-field-translation/class-wpml-copy-once-custom-field.php) file
4- Replace the following code at line 66
Kindly check this video to see how it works on my local installation. (hidden link)
I've applied the above steps to your staging site, except for the first step. Would you please deactivate the plugins and activate the WordPress default theme (Twenty Twenty-One)? After that, please update the page in the default language and check the issue.
Thank you very much for this super helpful answer, Osama.
Question: if i modify this file, it will be erased at the next WPML plugin update. Do you plan to port this change to the core plugin ?