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 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.
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: http://22.214.171.124/videos
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?
I think Elliot is still working on this. BTW, there is another support thread here on the same issue: http://support.advancedcustomfields.com/forums/topic/relationship-field-post-types-not-displaying-correctly/
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
The topic ‘Relationship field loses post type after save’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!