WordPress Uncaught TypeError: Argument 1 throws an exception during search indexing
We are using ElasticSearch (ElasticPress) to index our site. I know that in the latest CiviCRM it creates a page (ID: 5) which should not be deleted. For some weird reason this page (I believe) is causing exceptions although I could be wrong. If there is a way that I can output a bigger stacktrace let me know and I'll provide that. I honestly can't determine where this is originating from which is frustrating.
Regardless, each time that I index it hangs because an exception is thrown during the index process.
- Install ElasticPress
- Connect to your ElasticSearch
- Index the website and receive an error
`Uncaught TypeError: Argument 1 passed to civicrm_api3() must be of the type string, null given, called in /var/www/example.org/wp-content/plugins/content-views-civicrm-data-processor/includes/class-cvc-api.php on line 27 and defined in /var/www/example.org/wp-content/plugins/civicrm/civicrm/api/api.php:129 Stack trace:
#0 /var/www/example.org/wp-content/plugins/content-views-civicrm-data-processor/includes/class-cvc-api.php(27): civicrm_api3(NULL, 'getfields', Array)
#1 (closed) /var/www/example.org/wp-content/plugins/content-views-civicrm-data-processor/includes/class-cvc-api.php(49): Content_Views_CiviCRM_Api->call(NULL, 'getfields', Array)
#2 (closed) /var/www/example.org/wp-content/plugins/content-views-civicrm-data-processor/includes/class-cvc-display.php(256): Content_Views_CiviCRM_Api->call_values(NULL, 'getfields', Array)
#3 (closed) /var/www/example.org/wp-content/plugins/content-views-civicrm-data-processor/includes/class-cvc-display.php(180): Content_Views_CiviCRM_Display->get_fields in /var/www/example.org/wp-content/plugins/civicrm/civicrm/api/api.php on line 129`
I was expecting that if bad values are sent to CiviCRM it could just gracefully fail instead of throwing an exception.
- Browser: Firefox 59.0.1/Chrome 78.0.3904/Safari 13
- CiviCRM: Latest
- PHP: 7.2
- CMS: Wordpress
- Web Server: Nginx Latest