When editing and then saving a relationship, the AJAX overlay hangs with the spinning symbol. If the page is refreshed, the 'Relationship record has been updated." notification is shown and the change is saved in the DB

Console shows:

POST http://www.example.com/civicrm/contact/view/rel?action=update&cid=1234&id=4321&rtype=a_b&snippet=json 500 (Service unavailable (with message))

In syslog I'm getting the error:

http://www.example.com/civicrm/contact/view/rel?action=update&cid=24068&id=6749&rtype=b_a&snippet=json|http://www.example.com/civicrm/contact/view?reset=1&cid=24068|2386||Error: Call to undefined method CRM_Contact_BAO_Relationship::isCurrentEmployerNeedingToBeCleared() in CRM_Contact_Form_Relationship->setEmploymentRelationship() (line 654 of /var/www/html/sites/all/modules/civicrm/CRM/Contact/Form/Relationship.php).

This used to work correctly and seems like it may have stopped working after 5.x upgrade, though the server was also updated about the same time.

Appreciate any ideas on how to resolve this


The error claims that civi is not able to find the isCurrentEmployerNeedingToBeCleared() function in CRM/Contact/BAO/Relationship.php file.

It is not possible as this change was merged recently with the function being declared and used in the same PR https://github.com/civicrm/civicrm-core/pull/12032.

Quite possible that one of your custom extension OR custom php directory might be overriding CRM/Contact/BAO/Relationship.php file and is not updated to the latest 5.x version.

If you can check and update that file or simply disable the extension that overrides the file - the error should be fixed.

  • I never managed to fix this but after upgrading CiviCRM version again it started working again
    – mjcarter
    Feb 19 '19 at 2:02

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.