Home Forums ACF PRO Relationship field problem workaround


Relationship field problem workaround

  • Here’s a tip for anyone having the same problem. I had a relationship field that was working until I upgraded to Pro/upgraded WP to 4.0 (not sure which was the trigger.) After that, I could not view or search for any post in the field: it just said “Loading” forever.

    The problem turned out to be that the “Filter by Taxonomy” field in the Relationship field appeared to be blank, rather than showing the “No taxonomy filter” placeholder note.

    The only way I found to clear out whatever was in the field was to choose a taxonomy temporarily, save the field group, and then delete the taxonomy from the field. After that I saw the “No taxonomy filter” placeholder and the field worked correctly on the page.

  • Hi @shoshanna

    Thanks for the bug report. It sounds like the issue could have been a conflict in JS which was fixed when re-loading the page.

    If it happens again, please check your console log for a JS error.


  • I am having also problems with the relationship field. I don’t get any error on console. It is stuck on the “loading”

  • the workaround didn’t help. what kind information should I provide to help with the fix?

  • Hi @meszarosrob

    Are you able to create an account for me to see the issue?


  • This is a bug, “like_escape” is deprecated since version 4.0 and it is used in “/advanced-custom-fields/core/fields/relationship.php” on line 116. To fix it change “like_escape” to “$wpdb->esc_like”.

  • Hi @Weathercamp

    Thanks for the info. Your path points to an ACF v4 file, so this is not applicable with ACF PRO.

    – are you still having this issue? Do you have an account for me to test?

  • I’m seeing a similar problem now with a User field in WP 4.0 and ACF Pro 5.0.9. (The same issue was happening in ACF Pro 5.0.4 as well before I upgraded.)

    I have the User field set to “All User Roles” in the “Filter by roles” menu. When I try and select a user, I get “No matches found” in the menu.

    I have debug mode on, and I see no errors in the console.

    It sounds like the issue could have been a conflict in JS which was fixed when re-loading the page.

    Reloading the page doesn’t help, but what does work is editing the User field and changing the “Filter by Role” field to have any role selected instead of “All User Roles”.

    If I then update the fields, edit the field again and delete the role I selected so that it’s back to “All User Roles”, and update one more time, I can then go back to my page and select a user from the menu just fine.

  • Also, @Elliot Condon I can leave this unfixed for a short amount of time, so please let me know if you want a user account to see it!

  • I just had this issue and the workaround was to disable the taxonomy filter.

    Before the page was blocking the browser and nothing was shown on the JS console at all. Tried Chrome’s performance monitor to detect the blocking code but it did not list anything useful.

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Relationship field problem workaround’ is closed to new replies.