I just bought ACF Pro to use with WPML, and a strange problem appears.
When I create a field group, and then duplicate it with the WPML module in differente languages, it doesn’t do a duplication but a translation…
If I add some fields in the main language and update, it doesn’t replicate in other languages…
I don’t know if it comes from WPML or ACF but it used to work very well with ACF 4.4… Does anyone ever had this problem???
Can you please provide some step by step instructions to replicate the issue.
What is the end result of a ‘translation’ instead of a ‘duplication’?
Please confirm all WPML / ACF settings are correct as per: http://www.advancedcustomfields.com/resources/multilingual-custom-fields/
I am experiencing the same issue, even though I have the above WPML / ACF settings set up correctly.
The issue is rather straightforward.
After creating a field group in the default language, duplicating the field group does not work. The ticked duplicate box remains empty, and when going back to the field groups overview you see that it did create a translation, instead of a duplicate.
The end result of this is that for each field new fieldkeys are created for the translation. For my websites I need to have identical fieldkeys for my fieflds for all languages.
Thanks for the reply.
Each translation will end up giving each field a different key. This is not a bug, but a way for ACF to see that the 2 fields are different. The field’s name will remain the same, but not the key – similar to when you translate a post, and the ID will be different.
Does this help?
Thanks for the reply.
The problem is when you edit the main language, it doesn’t propagate on the other languages, because it is a translation and not a duplication.
And when you click “Overwrite” in the other languages, it duplicate all the fields, instead of overwritting them.
And it becomes quite complicated when you’ve got more than 5 languages…
It worked well with ACF (not pro)…
Thanks for your reply Elliot.
I understands how it works, but for my websites that use the free ACF version it really duplicated the field group, and the duplicated fields and their fieldkeys remained identical to the original.
The problem that I have now is that I have to update each individual post after I have duplicated them. All my translated posts are duplicates of the original, and for the duplicated I have only translated the select fields labels in the field groups and the hard coded text in the PHP. So I don’t need them to save any new data. I want them to be connected – when I update the default language post, I want the duplicated posts to also be automatically updated and overwritten too.
But now when the fieldkeys don’t match the original, I have to manually update the posts after duplication – otherwise the default language labels are shown, rather than my translated labels. And I have thousands of posts, so that is inconvenient.
So in other words, is it possible to give ACF pro, the same duplication process of Fields groups like in the free version? Where the field group is an actual duplicate, and not a translation.
Thanks for your help posting info above.
To be honest, I am quite confused about what the issues are here. I understand that you want the field keys to match across translated field groups, but I am not sure how I can help without understanding the problem.
Can you please be short and clear with screenshots / instructions to replicate the main issue?
It sounds like there are a few issues being reported in this thread, and I am not sure how to replicate / help.
WPML is a very very very complicated and messy plugin which I have done my best to add compatibility for, but you would be shocked to see how dificult it is to have ACF even working with it at all.
I do wish that ACF + WPML compatibility was better, but I need very clear and short issues so as to not get confused by all the information.
I think my problem is the same as the other guys here. I’ll try to describe it.
– Make a clean install of WP, only with ACF PRO and WPML
– Set up WPML with two languages (say, English and Danish)
– Make a ACF Field Group.
– On the Edit Field Group page, in the bottom box “Multilingual content setup”, check “Make fields groups translatable” and click “Save”.
– Still on the Edit Field Group page, in the language widget, check “Duplicate” and click the button “Duplicate”.
– The expected behaviour would be to get a duplicated field group in Danish that you could unlink from the English version yourself if you wanted. Instead you get an independent field group which is a translation of the English field group.
– Also, in the bottom box “Multilingual content setup”, the expected behaviour is to have a list of custom fields so you can choose which to copy and which to translate to other languages. On the Edit Field Group page, this list is empty.
This is a problem because you don’t want independently translated field groups when you have 5 languages as I have on our production site. Then you would have to update 5 field groups for each change you make.
I reached out to WPML also. They have escalated the issue to their developers, but that is two weeks ago so I thought maybe you could look into it. It only happens in ACF PRO, not ACF 4. So you probably changed something in PRO that WPML was not prepared for?
Let me know if I can provide any more info to help locate the issue.
And thanks for a great plugin!
@elliot, I will also try to explain what happens on our side.
We’ve encountered exactly the same issue with ACF PRO 5.3
What we basically want or expect to happen is when you duplicate a field group you want the groups to be linked in all languages.
So when you add a new field in the English version of the field group, this field also is created in all other languages.
At this moment when you duplicate a field group to different languages they don’t link anymore and are translated independently. So when you add a field to a field group, you have to do this manually for each language.
The easiest way to replicate is setup ACF as is, described with the documentation on the ACF website for WPML
– Create a field group in language A
– Add a field
– Duplicate the group to language B
– Check if the fields exist in both languages
– Then add another field to language A
– Check if the field also appears in language B
This is how it currently shows, because it’s translated independently:
This is how it should show (apart from the name):
Another addition to that:
Each language will require it’s own translation of a field group.
If this is true, then we obviously can’t link the field groups together to have a field group for language A that propagates to other languages. Something we desperatly want 😉
Sorry to be the guy who necros an old post like that but as of September 2016 the issue still persists. I am running ACF 5.4.4, WPML 18.104.22.168 and WordPress 4.6.1 so pretty much the bleeding edge on all fronts. I am experiencing the exact same bug as described above – when duplicating a field group from the main language to another I get a separate translation even though I check the Duplicate tickbox. This can lead to having a hard to diagnose discrepancy between field group definitions in different languages especially when working with a team of people. The groups need to be duplicates to remain up to date with the main language.
icl_make_duplicate filter intentionally disables this because of the following bugs (quoted from the source)
always translate independately to avoid many many bugs!
– translation post gets a new key (post_name) when origional post is saved
– local json creates new files due to changed key
Edit: This bug probably belongs over at WPML as they are the ones setting a new key when the fieldgroup is saved. https://wpml.org/forums/topic/wpml-acf-field-groups-are-not-duplicating-properly/
The topic ‘ACF Pro & WPML Duplicate’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!