Subject says it all. Just wondering if anyone has seen something like this before?

  • I've seen it but haven't yet dug into what is generating it. – Seamus Lee Jul 23 '18 at 21:33

This error is displayed when some Names for a relationship type do not match the Labels.

For example in civicrm_relationship_type table you may have something like

name_a_b = Mayor name_b_a = Mayor label_a_b = Mayor of label_b_a = Mayor is

You can correct these either in SQL or via the UI


To identify the rows causing the issue

select name_a_b, label_a_b, name_b_a, label_b_a from civicrm_relationship_type where name_a_b <> label_a_b;
select name_b_a, label_b_a from civicrm_relationship_type where name_b_a <> label_b_a;

To fix we want to set the name = to the label

Make a temporary backup - this will be dropped when you log out of mysql.

create temporary table temp_civicrm_relationship_type as select * from civicrm_relationship_type;
update civicrm_relationship_type set name_b_a = label_b_a where name_b_a <> label_b_a;
update civicrm_relationship_type set name_a_b = label_a_b where name_a_b <> label_a_b;

Confirm that the number of rows updated matches result of the query.

(nb I just grabbed this from a ticket in our own system but hope it is helpful in your case)

  • A tiny addendum: it seems SQL is the only place for edits, since it looks different via CiviCRM GUI (at civicrm/admin/reltype?reset=1) and in, say, phpmyadmin. – yurg Jul 27 '18 at 10:42
  • Just wondering what do we change to stay safe: name or label? One of this might be used/hard-coded somewhere (across templates for example) so we may break things. I'd say it is labels, but not really sure. Besides, making labels the same as names might not always have a semantic sense. – yurg Jul 27 '18 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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