Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
I have set up a bunch of custom fields for a post type using ACF. These will be translated using the translation editor. However, the custom fields appear in the order that they were added to the database, which does not match the order they are in when editing the posts. The order of custom fields in the posts follows that of the ACF field group and this order can be re-arranged, for example after adding more custom fields.

Solution:
WPML is not made to update based on the order changes that you made on the field group. This is gonna work only on the WordPress editor, but the WPML translation editor has no logic implemented for this.

Relevant Documentation:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

0% of people find this useful.

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.

This topic contains 11 replies, has 2 voices.

Last updated by Khamphone Saypaseuth 4 years, 4 months ago.

Assisted by: Radu.

Author Posts
October 6, 2020 at 5:55 pm #7175485

Khamphone Saypaseuth

Tell us what you are trying to do?
I have set up a bunch of custom fields for a post type using ACF. These will be translated using the translation editor. However, the custom fields appear in the order that they were added to the database, which does not match the order they are in when editing the posts. The order of custom fields in the posts follows that of the ACF field group and this order can be re-arranged, for example after adding more custom fields.

I would like the order of the custom fields in the translation editor to follow that of the post I'm translating (i.e. the field group in ACF). This is much easier to understand for the staff members adding the translations, who do not speak great English.

I've seen a few forum posts about the same topic, but they were closed without offering any solutions.
Is there a way to achieve this?
If not, can this option be added?

October 8, 2020 at 7:16 am #7187069

Radu

Hey there,

Thank you for reaching out to the WPML support!

Is there any chance that you could create a short video about how you are using the custom fields and how you're translating them, please? I just want to understand exactly what are the changes that you're making so I can do the same on my testing website and see what we can do about this.

You can use an online tool like loom.com or screencast-o-matic.com in order to make this video.

Thanks,
Radu

October 12, 2020 at 7:57 am #7209959

Khamphone Saypaseuth

Thanks for your reply.
It's fairly straight forward actually.
I will add a few screenshots to show what I mean.

wpml-translation-editor.png
acf-field-group.png
October 12, 2020 at 9:35 am #7210951

Radu

Hey,

Can you fully translate the page, then make a small change to the original page, then edit the translation again, please? This time, the order of the custom fields will change (I just tested this out on my website).

Basically, when you start a translation, WPML is scanning the original page and gives you all the elements for translation. He also gets the order of the custom fields too. After that, the original page won't be scanned again for the strings or the order of the custom fields unless you make a change on it. This way we save a lot of requests when you are editing the page translation (this is really helpful when you have a lot of elements on the page and scanning a big page would consume a lot of resources of the server).

Can you give this a try and tell me if things are working fine for you too, if you make this change, please?

Thanks,
Radu

October 12, 2020 at 1:30 pm #7212793

Khamphone Saypaseuth

Thanks for your speedy reply.
I hadn't started translation for any of the pages before I changed the order of items in the ACF field groups though? I started the translation AFTER the order of items was changed in ACF. Therefore, shouldn't WMPL then scan the correct order?
Or how did you do it in your case?
It seems to me that WMPL is sorting by creation date of the custom fields in the database.

October 12, 2020 at 1:59 pm #7213359

Radu

Hey,

What I did was to create the custom fields, use the on the page, translate the page (including the custom fields), then change the order of the custom fields. Now I made a change on the page with the custom fields (I changed the text of a custom field) and when I edited the translated page, the order of the custom fields changed too.

Can you try to do this change on your website too and let me know how it goes, please?

Thanks,
Radu

October 13, 2020 at 6:36 am #7216119

Khamphone Saypaseuth

Okay, I've tried, but it has the same outcome.
As mentioned, none of the pages had been translated yet, so supposedly WPML had never scanned them for custom fields before.

Looking at wp_postmeta table in the database, the meta_id numbering seems to follow the original field order in the ACF field group, i.e. lower meta_id numbers appeared above higher numbers in the field group. However, WPML is not following either this original order or the updated one. The field order in WPML seems completely random to me.

October 13, 2020 at 12:26 pm #7219025

Radu

Hey there,

I was able to replicate this issue on a clean install (when I tried to do the same yesterday, things worked fine for some unknown reason). Also, thank you for the info that you added to your last reply.

In the meantime, I run a couple more tests with the custom fields but couldn't make them change the order, no matter what I've been trying to do. In this case, I had to pass this to my colleagues and let them have a look at this. I'll keep you posted as soon as I have an update (which shouldn't take long).

Thanks,
Radu

October 13, 2020 at 2:58 pm #7220255

Khamphone Saypaseuth

Thank you Radu!

October 13, 2020 at 3:13 pm #7220279

Radu

Anytime 🙂

I'll give you a message back as soon as I have an update from my colleagues.

Radu

October 16, 2020 at 8:50 am #7242707

Radu

Hey,

I talked with my colleagues about this, as I promised. However, it turns out that WPML is not made to update based on the order changes that you made on the field group.
This is gonna work only on the WordPress editor, but the WPML translation editor has no logic implemented for this, at least for now.

You can submit this as a feature suggestion right here https://wpml.org/suggest-a-new-feature-for-wpml/ and we'll see what we can do about it in future updates.

Thanks,
Radu

October 19, 2020 at 4:02 pm #7259833

Khamphone Saypaseuth

Thanks for following up Radu.
I was considering switching to translating via the WordPress editor already, due to other issues, e.g. Elementor strings showing up in the translation editor on each page.
I remember when WPML used to make translating much easier, but these issues with both ACF and Elementor are proving serious limitations.