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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 15:00 | 8:00 – 15:00 | 8:00 – 15:00 | 8:00 – 15:00 | 8:00 – 15:00 | - |
- | 16:00 – 17:00 | 16:00 – 17:00 | 16:00 – 17:00 | 16:00 – 17:00 | 16:00 – 17:00 | - |
Supporter timezone: Europe/Rome (GMT+01:00)
This topic contains 7 replies, has 2 voices.
Last updated by Alejandro 1 year, 1 month ago.
Assisted by: Alejandro.
Author | Posts |
---|---|
September 25, 2023 at 2:20 pm | |
marcialB |
hi there |
September 25, 2023 at 3:21 pm | |
September 25, 2023 at 8:03 pm #14461931 | |
marcialB |
Hi Noman I enabled the debug mode, created a new people post (hidden link) and disabled all other plugins. The issue still persists. You can download the debug log here: hidden link. I also added the error log from the server. Thanks for looking into it. |
September 27, 2023 at 9:21 am #14471987 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Hello! I have a quick question here. i see that you are testing the content on a new CPT that i suspect you creating using ACF, correct? If that's the case, would it be possible to test the same on a page or post (A default cpt) to see if it works there? i'm saying this because we are working on improving the compatibility with custom post types created by ACF, and i would like to make sure the problem only happens if you are using such scenario, so i can then bring this to the attention of our devs and hopefully find you a solution 🙂 Try it out and let me know how it goes or even how are you setting it up, so i can also try to recreate it on my end. |
September 27, 2023 at 11:17 am #14473239 | |
marcialB |
Hi Alejandro Yes, this is purely made within ACF (both creating the post types as well as the custom fields). I'll set up a different relationship we can test with the default posts. If this helps: one of our developers checked the database (I think it was the post meta table) and mentioned that he sees a lot of content loaded in the relationship field of a translated post. I'm not sure about this but as far as I understood, instead of just loading the ID of the connected post, it seems to load much more. This might cause the loop to not work in translations. Maybe your developers can have a look at that. Best, |
September 27, 2023 at 11:38 am #14473525 | |
marcialB |
It's not working with the default posts either: hidden link. What's important to know: we select the related posts by matching the ID. You can see the setup when you open the page in the backend (hidden link) and open the post cards element and scroll down to "Custom Field - Value Comparison" and "Custom Field - Value". Maybe WPML isn't doing it that way in the translations and thus there are no results returned. |
September 27, 2023 at 1:27 pm #14474435 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
you mention that: " we select the related posts by matching the ID." May i know more about this? are you doing it via code? because the ID's will change in the translated version so if you don't use our hooks, then you'll probably end up without a proper match, thus and empty result. something like this might help there: https://wpml.org/wpml-hook/wpml_object_id/ However, more info on this would definitely help. about the metadata info, instead, i'll ask our devs what should be the correct output there because i believe that just an ID or an array of ID is not what's supposed to appear there (but i'm not an ACF expert at that level, so i'm not 100% sure of it). Please let me know. |
October 2, 2023 at 2:59 pm #14499023 | |
marcialB |
Hi Alejandro When you open a translation in the default editor (what you usually shouldn't do to not interfere with the advanced translation editor), you see that all the related posts appear correctly in the corresponding acf interface. Thus I assume it's working correctly and I don't quite understand why it would work in the backend but not in the frontend. However, I'll forward that object_id topic to our devs. Best, |
October 2, 2023 at 3:33 pm #14499165 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Opening it in the back-end is ok for any language, what you shouldn't do is change it. If it appears ok in the back-end but not in the front-end, then chances are the problem is in the code, something is not being retrieved correctly in the code. Would it be possible for you to indicate where is the code for this part of the site located? i may have a better idea of what to do after having inspected it. |
The topic ‘[Closed] ACF relationship fields Sync issues’ is closed to new replies.