Background of the issue:
I have encountered an issue when using ACF in combination with ACFML and WPML. Specifically, this problem occurs with repeater fields in a standard WordPress post.
When the repeater field and its subfields are set to "No Translate," the repeater field correctly returns an array. However, when I change the translation settings to "Translate" for the repeater field and its subfields, the repeater field begins to return a number (1, 2, 3, etc.), depending on the number of repetitions, instead of returning an array.
This behavior significantly disrupts the expected functionality of repeater fields, as the array structure is crucial for accessing the repeated data.
Could you please investigate this issue and provide guidance or a fix?
Thank you for your prompt response. However, I believe there is a misunderstanding regarding the issue I described.
The problem occurs specifically when I set the repeater field and its subfields to "Translate." In this scenario, instead of returning an array as expected, the repeater field returns a number (the count of repetitions) rather than the array of repeated fields.
I understand the recommendation to set the repeater field to "Copy" and the subfields to "Translate," but in my case, I need the repeater field and its subfields to be translatable. The issue is that when I configure it this way, the expected array structure is lost.
Could you please look into this specific issue? I believe it may require a different approach or further investigation.
Repeater fields shouldn't be translated, they should either be set as COPY (to get the exact same number of repetitions) or COPY ONCE (if you want to use the WordPress editor and have a different number of repetitions). For more information you can read this section "Translating ACF Repeater Fields with WPML"
If the issue persists after changing the translation preference to COPY, please provide me with a temporary admin access – preferably to a staging copy where the issue has been replicated – so I can further investigate. I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.
IMPORTANT: Before we proceed, please backup your site and database.
I've activated a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.
IMPORTANT: Before we proceed, please backup your site and database.
The topic ‘[Closed] Issue with ACFML Repeater Fields Returning Numbers Instead of Array with WPML Translation Enabled’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.