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: Bug
This topic contains 9 replies, has 3 voices.
Last updated by Ahmed Mohammed 1 year, 8 months ago.
Assisted by: Ahmed Mohammed.
Author | Posts |
---|---|
March 13, 2023 at 1:47 pm #13233475 | |
jeroenP-6 |
When updating the ACFML plugin to 2.0 several concerning things happened. I have updated the plugins on two different local instances and the both have the similar issues - After enabling the ACFML 2.0 plugin a lot (not all) ACF field groups are duplicated. I am very anxious for updating the plugin, seeing al these bugs. Is there a migration guide or process, for using an existing setup? |
March 13, 2023 at 2:12 pm #13233717 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+02:00) |
Hi there, Thank you for contacting WPML support, and sorry to hear about the issues after updating ACFML plugin to the latest version. I have checked the website's debug information, and I can see that all plugins are updated. Could you please confirm which ACFML version you updated from? Furthermore, would it be possible for you to provide us with a copy of the website before the plugin update? We would like to test the update and see what happened. We usually recommend the free Plugin “Duplicator” (http://wordpress.org/plugins/duplicator/) for this purpose. I have enabled the private reply for you to provide us with the package and the login details. Looking forward to hearing back from you. |
March 13, 2023 at 4:23 pm #13234867 | |
Jamal |
Hello there, and thank you for providing this staging site. This is Jamal from the compatibility team. I have been involved in the development of this new version of ACFML. Let me try to take a copy of your website using duplicator or another plugin, that would help us very much to debug the issue of the update and I'll get back to you as soon as possible. |
March 14, 2023 at 1:43 pm #13243267 | |
Jamal |
Hello again, I am getting back to you to share a patched version of the plugin that should update your website without duplicating the field groups. Please find it here hidden link Based on my debugging on a copy of the shared staging site, this issue happens because there is a difference between the ACF fields groups from the theme's acf-json folder, and the database. To be honest, this is the first time I get to see the "Awating save" status. And it seems to happen if ACF encounters issues writing into the theme's acf-json folder. Maybe this ACF support thread could explain it better hidden link In this ACFML update, we run some code to set the new Translation Option(Expert) for the existing field groups. Read more about this new option here https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#selecting-a-translation-option I run a test on the staging site you provided, and it did not duplicate any field group. However, it did inactivate a field group, and it did synchronize other field groups. This being said, I'll ask you to try again on a new staging. And let us know your results. We'll be happy to assist you further if you encounter any issues. All the best! |
March 14, 2023 at 4:34 pm #13245155 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+02:00) |
--Updating the ticket status-- |
March 15, 2023 at 11:54 am #13250761 | |
jeroenP-6 |
Thanks so much for looking into this. I will block some time in the upcoming days to dive into the matter, so we can together look for what is actually happening. |
March 15, 2023 at 12:41 pm #13251285 | |
Jamal |
Hello again! I'll try to reply to your question in a slightly different order.
Yes, exactly.
Yes, for sure. On the tests we have done during our developement of ACFML 2.0, we always had the field groups set to "Saved", and we never got duplication issues.
Based on the issues you encountered, we realized that we should handle the case when ACF API returns a Field group that has no ID. In this case, we should not update it. Our features are based on ACF, so we'd prefer to let ACF first save these kind of field groups, and once it return valid groups to us, we'll add our translation option to them.
We used ACF API to interact with field groups, functions such as acf_get_field_groups and acf_update_field_group. And the first one did return some field groups without IDs. This may happen if the field group exists on a JSON file but not yet saved on the database, or if it was registered with PHP code. To be honest, I did not dig into it deeper as it seems to be very ACF specific rather than ACFML related. I believe that the ACF team is the best placed to answer that.
To be honest, it was the first time I see this status in my ACF experience. I believe the ACF support team will be the best to explain it. If you do so, please share your finding with us on this thread. I hope this answers your question, and I'll remain at your disposal for anything further. |
March 16, 2023 at 10:55 am #13258499 | |
jeroenP-6 |
Hey Jamal, I saw that you published a ACFML 2.0.1 update, which addresses the issue we discussed. When we locally update the plugins (acfml to 2.0.1, sitepress-multilingual-cms to 4.6.0 and wpml-string-translation to 3.2.4) we do not see the creation of new ACF fields as before, so that seems to work! I do have some questions about the updates in the local ACF JSON files. 1. Reference to local file. "local_file": "\/Users\/aron\/Sites\/wp-funcakes\/content\/themes\/funcakes\/acf-json\/group_5a2e617912bd5.json" in the json file. We use the ACF JSON files to synchronise changes of ACF fields across several environments (local dev machines, staging, production). Therefore a reference to any local file, stating my personal machine name "aron" seems quite odd as it would only work for my machine? What is the concept behind this implementation? 2. Cloned fields are displayed inline |
March 16, 2023 at 12:01 pm #13259097 | |
Jamal |
Hello again! I am glad we could fix this this fast. Thank you for your report. Regarding the first question, I believe this is something done on the ACF side. I know that ACFML does not read or write the ACF local JSON files. We only add an attribute to the array(PHP array) and we let ACF handles everything else. Regarding the second issue, it may also be the same. This being said, and because we need to handle one issue per forum thread, I'll invite you to: |
March 26, 2023 at 3:28 pm #13332057 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+02:00) |
Changing the ticket status. |