Home›Support›English Support›[Resolved] ACF relationship field search field disabled in translated posts in v2.1.x of ACFML
[Resolved] ACF relationship field search field disabled in translated posts in v2.1.x of ACFML
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing an issue where the search input field on an ACF relationship field is disabled in translated posts, this might be due to a change introduced in version 2.1.0 of the Advanced Custom Fields Multilingual (ACFML) plugin. This problem persists in version 2.1.3. Solution: We recommend modifying a line of code in the ACFML plugin. In the file
This change might resolve the issue. However, please note that this solution could become outdated or might not apply to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.
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.
Thanks for checking. At this point I don't know how to get the problem to consistently occur. It keeps flip-flopping between disabled and not disabled for reasons I can't work out. Which isn't really a conclusion either way (and not something I can say to the client).
Looking at the code, specifically in this case of the relationship field this is the line of JS in ACFML that is disabling the relationship field's search box.
I've tried to take this as far as I can on the test site, I've recreated the custom post types, made the WPML translation settings for those match my site and made the Related Content relationship field match. (Screenshot iord)
My site - Still disabled
Test site - Not disabled.
All I can see at this stage is that my site is loading the acfml/assets/js/admin-script.js file, which is disabling the fields, and the test site is not loading the acfml JS file. (Screenshot iqjz)
I really need to know why it would not load? Is another field on my site maybe causing the JS file to enqueue / no be dequeued?
Do you have the latest version of ACF on your site? Also, we will need to test your site in minimal settings, meaning only WPML active with ACF plugins and a default theme. Do you have a staging site where we can test that? If not, you can set one up with a plugin like WP Staging, or if that won't work, let me know and we can migrate a copy of your site to our cloudways server for testing in minimal settings.
I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
I noticed on the two links you shared that are disabled, that these publications are not linked to an English translation. If you link it to an English translation, does the search work after that? I'm trying to determine if that could be the difference between the ones that are working and the ones that are not.
Loaded this non-English item, fields are disabled. hidden link
I created this English item: hidden link
Went back to the French item, connected it with the English item.
And now the fields **are** searchable here: hidden link
---
I've just been going through the admin listing, editing items that have a translation a lot of them are not disabled.
I came across this one which is still disabled: hidden link
---
Another one: hidden link
And without update_needed in the URL, same effect: hidden link
---
I started to think maybe "Update needed" meant it was disabled, but then this one doesn't fit that theory either.
hidden link
---
I don't think we've pinpointed the pattern just yet... Is this at a stage it can be escalated to the dev team yet? I'll be on leave next week so can't follow this up much during that time.
I have escalated this to our 2nd tier team so that they can further debug. I hope to have some additional information by the time you return. I hope you enjoy your time away!
Our developers have found that in a local copy of the sandbox site, with all plugins updated to their recent releases (ACF and WPML), they are no longer able to reproduce the issue. Can you please test that on your live or staging site and let me know if you see the issue still happening?
Thanks for the update. I see the sandbox link you provided has been deleted so I'm not able to check that. "Your sandbox has expired".
I've updated all of the active plugins on the test site I shared with you and I'm still having the issue. (Screenshot attached of active plugins).
I'm still seeing the issue here: hidden link
(Screenshot attached).
And I'm still seeing the problem Javascript loading which is just some jQuery setting .prop('disabled', true) on the elements I'm having issues with.
(Screenshot attached).
(The login details for wpml.calp.sbx.so that I shared previously are still valid).
Could you ask the developers to take another look please?