Home › Forums › General Issues › Bidirectional Relationships not updating both sides › Reply To: Bidirectional Relationships not updating both sides
Ok dokey, so undertaking the same process.
Before my update:
post_id 16095 (Vacancy): field_58c2e0bbb4904
post_id 15540 (Research Group): field_58b99b4e8da6c
After my update:
post_id 16095 (Vacancy): field_58c2e0bbb4904
post_id 15540 (Research Group): field_58c2e0bbb4904
After re-updating my admin post:
post_id 16095 (Vacancy): field_58c2e0bbb4904
post_id 15540 (Research Group): field_58b99b4e8da6c
Ok so looking at this. I can see that the field key references are initially different.
After updating, the field key references change to the same value (my broken post is the value which changes to match the other)
And then after re-updating my broken post the field key reference for this post updates back to it’s original value.
Now this would make me think it was an issue with how the fields are registered initially, but surely they must have different keys in order to show the matching values. e.g. show groups on the vacancies admin or vice versa; show vacancies within the groups admin.
So perhaps it’s an issue with my update_value call? although I followed the documentation for this to reference to the field name.
e.g. add_filter(‘acf/update_value/name=research_group_vacancies_relationship’, ‘bidirectional_acf_update_value’, 10, 3);
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.