Answers.Body: <p>Turns out this was somehow due to the CiviCRM Entity Drupal module (we had 7.x.2.3). Not entirely sure what was happening as I can't reproduce it locally, but disabling the module fixes the problem.</p>
  <p>This was logged:
  <code>Error: Cannot use object of type CRM_Core_DAO_EntityTag as array in civicrm_entity_civicrm_post() (line 3601 of /var/www/html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module).</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-23T20:48:14.857Z
Answers.LastActivityDate: 2023-06-23T20:48:14.857Z
Answers.UserDisplayName: Lars SG
Body: <p>We're having an odd problem with saving tags on SearchKit saved searches that I cannot replicate on dmaster. If you try to save a search with changes to the search itself or to only the tags, it works fine. If you change the search and change the tags, the tag changes are not saved and in fact all tags are removed from the search - which is a real pain! The save button just says saving indefinitely, though the changes to the search are saved (except the tags).</p>
  <p>When this happens, I note a console error: <code>POST [Our site]/civicrm/ajax/api4 503 (Service Unavailable)</code>, followed by a <code>Possibly unhandled rejection: undefined</code>. But it is unclear to me why <code>[Our site]/civicrm/ajax/api4</code> would be called (as opposed to <code>[Our site]/civicrm/ajax/api4/entity/</code>). This URL does in fact return a 503 on our site and returns <code>Could not find valid value for calls</code> on dmaster (where this problem does not occur).</p>
  <p>This is on 5.56.2 on D7, but it has been occurring since at least 5.49.</p>
  
Tags: <searchkit>
Title: Cannot save tags on SearchKit saved search
ThreadText: # Cannot save tags on SearchKit saved search
  
  (Asked by: username_0 on 2023-01-21)
  
  We're having an odd problem with saving tags on SearchKit saved searches that I cannot replicate on dmaster. If you try to save a search with changes to the search itself or to only the tags, it works fine. If you change the search and change the tags, the tag changes are not saved and in fact all tags are removed from the search - which is a real pain! The save button just says saving indefinitely, though the changes to the search are saved (except the tags).
  
  When this happens, I note a console error: `POST [Our site]/civicrm/ajax/api4 503 (Service Unavailable)`, followed by a `Possibly unhandled rejection: undefined`. But it is unclear to me why `[Our site]/civicrm/ajax/api4` would be called (as opposed to `[Our site]/civicrm/ajax/api4/entity/`). This URL does in fact return a 503 on our site and returns `Could not find valid value for calls` on dmaster (where this problem does not occur).
  
  This is on 5.56.2 on D7, but it has been occurring since at least 5.49.
  
  **Tags:** searchkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-06-23. Score: 0
  
  Turns out this was somehow due to the CiviCRM Entity Drupal module (we had 7.x.2.3). Not entirely sure what was happening as I can't reproduce it locally, but disabling the module fixes the problem.
  
  This was logged:
  `Error: Cannot use object of type CRM_Core_DAO_EntityTag as array in civicrm_entity_civicrm_post() (line 3601 of /var/www/html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module).`
  
  
  ---
  
  