Answers.Body: <p>The error claims that civi is not able to find the <code>isCurrentEmployerNeedingToBeCleared()</code> function in <code>CRM/Contact/BAO/Relationship.php</code> file.</p>
  
  <p>It is not possible as this change was merged recently with the function being declared and used in the same PR <a href="https://github.com/civicrm/civicrm-core/pull/12032" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/12032</a>.</p>
  
  <p>Quite possible that one of your custom extension OR custom php directory might be overriding <code>CRM/Contact/BAO/Relationship.php</code> file and is not updated to the latest 5.x version.</p>
  
  <p>If you can check and update that file or simply disable the extension that overrides the file - the error should be fixed.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T02:02:46.647Z
Answers.Text: I never managed to fix this but after upgrading CiviCRM version again it started working again
Answers.UserDisplayName: mjcarter
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-17T06:13:21.290Z
Answers.LastActivityDate: 2018-10-17T06:13:21.290Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>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</p>
  
  <p>Console shows:</p>
  
  <pre><code>POST http://www.example.com/civicrm/contact/view/rel?action=update&amp;cid=1234&amp;id=4321&amp;rtype=a_b&amp;snippet=json 500 (Service unavailable (with message))
  </code></pre>
  
  <p>In syslog I'm getting the error:</p>
  
  <pre><code>http://www.example.com/civicrm/contact/view/rel?action=update&amp;cid=24068&amp;id=6749&amp;rtype=b_a&amp;snippet=json|http://www.example.com/civicrm/contact/view?reset=1&amp;cid=24068|2386||Error: Call to undefined method CRM_Contact_BAO_Relationship::isCurrentEmployerNeedingToBeCleared() in CRM_Contact_Form_Relationship-&gt;setEmploymentRelationship() (line 654 of /var/www/html/sites/all/modules/civicrm/CRM/Contact/Form/Relationship.php).
  </code></pre>
  
  <p>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.</p>
  
  <p>Appreciate any ideas on how to resolve this</p>
  
Tags: <error><relationships>
Title: Error in CRM_Contact_Form_Relationship->setEmploymentRelationship() when saving an edited relationship
ThreadText: # Error in CRM_Contact_Form_Relationship->setEmploymentRelationship() when saving an edited relationship
  
  (Asked by: username_0 on 2018-10-17)
  
  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
  
  **Tags:** error, relationships
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-10-17. Score: 3 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: I never managed to fix this but after upgrading CiviCRM version again it started working again  
  
  ---
  
  