Goal is to let X "favourite" Y and vice versa

But seems that civi won't let us do both between the same two contacts, ie we cannot let X favourite Y and at same time have Y favourites X.

Is it meant to be impossible to have 2 people with same relationship twice, once in either direction?

  • I can't think why it wouldn't allow this - what happens if you manually insert the 2nd in the civicrm_relationship table?
    – Demerit
    Jul 4, 2016 at 22:10
  • it works fine. Looks like there is some code in github.com/civicrm/civicrm-core/blob/… that is prohibiting this. so maybe an extension that provides a per relationship checkbox to permit (or prohibit depending which should be default) bi-directional relationships
    – petednz - fuzion
    Jul 5, 2016 at 4:51
  • 1
    We have had this fixed but i haven't had a chance to get the extension published or shared.
    – petednz - fuzion
    Sep 3, 2016 at 9:19
  • note to self: r10680
    – petednz - fuzion
    Nov 2, 2016 at 19:50

2 Answers 2


Doing some research on your find using svn blame and svn log on the old svn repo, this appears to have been implemented as part of https://issues.civicrm.org/jira/browse/CRM-58, and the key comment is

i.e. if there is "Parent" relationship between 2 contacts then you cannot add another relationship "child " between them.

The code for this is also what's stopping adding the second "favourite". So it seems like the checking is too aggressive - makes sense to prevent the parent being a child of their spouse (except in some geographical regions where it might be true (grin)), but not your use-case.


This is now possible and there is a patch to optionally allow bi-directional relationships in JIRA

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.