Answers.Body: <p>Turns out ot was a php function call outside class methods in an old extension which used to work before but now caused this weird behaviour.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-07T21:04:09.193Z
Answers.LastActivityDate: 2021-08-07T21:04:09.193Z
Answers.UserDisplayName: nielo
Body: <p>I really would appreciate any advice to dig deeper into the debugging of some errors. The reason may lay in our installation which is grown since late 2015 (I think it was version 4.2) and widely customized. But the errors appear in combination with some newly installed extensions.</p>
  <ol>
  <li><a href="https://lab.civicrm.org/extensions/expenses" rel="nofollow noreferrer">civi expenses</a>: when I try to add an expense, I get an ajax error <code>Error: Class name must be a valid object or a string in Civi\Api4\Service\Spec\SpecGatherer-&gt;getDAOFields() (Zeile 168 sites/all/modules/civicrm/Civi/Api4/Service/Spec/SpecGatherer.php).</code></li>
  <li>Same when adding a new <a href="https://lab.civicrm.org/extensions/dataprocessor/" rel="nofollow noreferrer">dataprocessor</a> <code>Error: Class name must be a valid object or a string in _civicrm_api3_basic_create_fallback() (Zeile 1347 von sites/all/modules/civicrm/api/v3/utils.php).</code></li>
  </ol>
  <p>In both cases it seems an api call is not registered correctly - v4 in the former and v3 in the latter).</p>
  <p>I flushed all caches a thousand times.</p>
  <p>The extensions and their db updates are up to date as the core's. The status page does not list any errors. I de- and reinstalled extensions and deinstalled old and unneeded extensions.</p>
  <p>I tried to produce some stacktraces with drupal's devel module but w/o success. And I did ask the extensions' author about ideas but no luck as well.</p>
  <p>php is 7.2, our civi ist 5.37.2, drupal 7 is latest.</p>
  <p>We are desperately willing to buy consulting hours.</p>
  
Tags: <extension><core><apiv4>
Title: Group of unsolvable API and core errors
ThreadText: # Group of unsolvable API and core errors
  
  (Asked by: username_0 on 2021-07-12)
  
  I really would appreciate any advice to dig deeper into the debugging of some errors. The reason may lay in our installation which is grown since late 2015 (I think it was version 4.2) and widely customized. But the errors appear in combination with some newly installed extensions.
  
  1. [civi expenses](https://lab.civicrm.org/extensions/expenses): when I try to add an expense, I get an ajax error `Error: Class name must be a valid object or a string in Civi\Api4\Service\Spec\SpecGatherer->getDAOFields() (Zeile 168 sites/all/modules/civicrm/Civi/Api4/Service/Spec/SpecGatherer.php).`
  2. Same when adding a new [dataprocessor](https://lab.civicrm.org/extensions/dataprocessor/) `Error: Class name must be a valid object or a string in _civicrm_api3_basic_create_fallback() (Zeile 1347 von sites/all/modules/civicrm/api/v3/utils.php).`
  
  In both cases it seems an api call is not registered correctly - v4 in the former and v3 in the latter).
  
  I flushed all caches a thousand times.
  
  The extensions and their db updates are up to date as the core's. The status page does not list any errors. I de- and reinstalled extensions and deinstalled old and unneeded extensions.
  
  I tried to produce some stacktraces with drupal's devel module but w/o success. And I did ask the extensions' author about ideas but no luck as well.
  
  php is 7.2, our civi ist 5.37.2, drupal 7 is latest.
  
  We are desperately willing to buy consulting hours.
  
  **Tags:** extension, core, apiv4
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-08-07. Score: 1 | Accepted answer
  
  Turns out ot was a php function call outside class methods in an old extension which used to work before but now caused this weird behaviour.
  
  
  ---
  
  