- WordPress v5.6.1
- CiviCRM 5.34.0
- php 7.3
- No custom extensions that affect contributions except CiviDiscount.
When I try to add a new contribution or view contributions, I get an error and the log files have the following:
PHP Fatal error: Only variables can be passed by reference in /home/xxx/www/www/wp-content/plugins/civicrm/civicrm/api/v3/Contribution.php on line 684
PHP Warning: Declaration of CRM_Contribute_BAO_Contribution::getExportableFieldsWithPseudoConstants() should be compatible with CRM_Core_DAO::getExportableFieldsWithPseudoConstants($baoClass) in /home/xxx/www/www/civicrm_custom/php/CRM/Contribute/BAO/Contribution.php on line 33
It's also affecting groups so they won't load the contacts but I can view the group settings/Manage groups page.
If I disable the CiviContribute component, it all works fine.
Under the WordPress Site Health page, there are some php warnings but I don't know enough to know whether any of these would affect CiviCRM, e.g.
An active PHP session was detected
A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.
The REST API encountered an error
The REST API request failed due to an error. Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)
Your site could not complete a loopback request
The loopback request to your site failed, this means features relying on them are not currently working as expected. Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)
I did try the site with php7.4 but that made no difference. From the error log, it looks like this has been happening since I upgraded the site to 5.33.2 in January. I ran another update today to 5.34.0 but that's not made a difference.
Any ideas would be gratefully received!