Home Forums Bug Reports Relationship field loses post type after save


Relationship field loses post type after save

  • When adding selecting custom post types from a relationship field, they initially show the post type eg. post, page etc but when the current page/post is saved they all show the post type of the current page/post.

    eg. on a page, select relationship to a post and a page. They show as page and post. After save they both show as page

  • I’m experiencing the same exact issue. I’m on the latest version of ACF and the ACF Repeater plugin.

  • I am also experiencing the same issue in the latest plugin version with Page Link (reverts to the first page but the front-end there is nothing printed out), File (acts like no file was added), and Text (becomes blank); I am using them all in a repeater field as choices to link a section to. In every case, when calling the_field(), it returns nothing to the front end. I’ve also tried changing the field names to all three be separate names and the same problem arises.

  • I’d like to add that I have noticed the issue also appearing with multiple WYSIWYG editors in a repeater field.

  • Can anyone recommend a quick patch? We have clients depending on this feature and it’s proving to be really annoying with the amount of possible relationships being displayed to them.

  • I too have clients depending on the feature but have yet to find a viable workaround. I haven’t had a chance to fully test it but have you tried switching to Post Object or removing any logic from fields?

  • Same problem here.

  • Hey guys

    Thanks for the bug report. This issue has been fixed on the github version:


  • Thanks for the quick response Elliot! I replaced the relationship.php file and it seems like whenever I try adjusting the custom field in the ACF editor the new post_type I’m targeting still doesn’t update.

  • Yes, thanks for the rapid response, Elliot!

    In my case, I copied the entire ACF-master folder from github to my plugins directory and renamed it Advanced-Custom-Fields. Following that, the post type for the selected related posts DOES get saved correctly now (instead of changing to the post type of the containing post). However, on the front end I still see no data drawn from the related posts.

    You can see the problem here on our test site:

    The top 5 items (at this writing) in the main listing on our test page show the bug, where the two people’s names are missing from each item. Further down in the list, older posts saved with an old version of ACF (3.1.0) do not have this problem. But whenever I update a post, or create an entirely new one, the bug occurs.

    Anyone else seeing something similar?

  • Is anything going to be done about this?

  • I think Elliot is still working on this. BTW, there is another support thread here on the same issue:

  • I believe this has already been fixed:

    Though I’m not sure in which version this would be present.
    Did Elliot stop tagging the versions on Github?
    I currently have 4.3.8 installed but Github only goes up to 4.3.5

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

The topic ‘Relationship field loses post type after save’ is closed to new replies.