0

I performed a Civi upgrade from v5.65.1 to 5.74.0 on Wordpress 6.5.4. I am running Php 8.2.19.

I have also added.... define('CIVICRM_SMARTY_AUTOLOAD_PATH', '/var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/autoload.php'); into civicrm.settings.php

The upgrade was successful, however we are getting this error when registering for an event "Expected to find one Participant record, but there were zero."

Error log is as follows:-

[error] $Fatal Error Details = array:3 [ "message" => "Expected to find one Participant record, but there were zero." "code" => null "exception" => CRM_Core_Exception {#13091 #message: "Expected to find one Participant record, but there were zero." #code: 0 #file: "/var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/Array.php" #line: 1245 #cause: null -_trace: null -errorData: array:1 [ "error_code" => 0 ] trace: { /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/Array.php:1245 { CRM_Utils_Array::single(iterable $items, string $recordTypeLabel = 'record') › if ($result === NULL) { › throw new \CRM_Core_Exception("Expected to find one {$recordTypeLabel}, but there were zero."); › } } /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Api4/Generic/Result.php:90 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment.php:1245 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalImpl.php:258 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalImpl.php:897 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:1168 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Register.php:899 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:646 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:333 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm.php:1231 { …} /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/includes/civicrm.basepage.php:425 { …} /var/www/vhosts/example.org/httpdocs/wp-includes/class-wp-hook.php:324 { …} /var/www/vhosts/example.org/httpdocs/wp-includes/class-wp-hook.php:348 { …} /var/www/vhosts/example.org/httpdocs/wp-includes/plugin.php:565 { …} /var/www/vhosts/example.org/httpdocs/wp-includes/class-wp.php:830 { …} /var/www/vhosts/example.org/httpdocs/wp-includes/functions.php:1336 { …} /var/www/vhosts/example.org/httpdocs/wp-blog-header.php:16 { …} /var/www/vhosts/example.org/httpdocs/index.php:17 { …} } } ]

Any assistance would be greatly appreciated.

Thank you.

2
  • Are you using Paypal Standard? Commented Jun 10 at 9:40
  • @Pradeep - We are using PayPal Express
    – markd
    Commented Jun 10 at 20:20

1 Answer 1

0

It was a regression issue caused by a recent change.

I have submitted a PR for the fix and should be available in the next release. Alternatively, you can apply the patch

12
  • @ Pradeep - can you please provide more information on how I apply this patch. Do I copy this code into the file. thx
    – markd
    Commented Jun 10 at 20:23
  • yes that's correct Commented Jun 10 at 21:09
  • I removed line 361 and added the new line as per your line in the file PayPalImpl.php $args['cancelURL'] = $this->getCancelUrl($params['qfKey'], ($params['participantID'] ?? NULL)); however I still got the same error.
    – markd
    Commented Jun 11 at 11:29
  • Did you the same line? Commented Jun 11 at 12:55
  • 1
    it looks like the latest patch worked on my production server....hence I am very appreciative of your assistance.
    – markd
    Commented Jun 12 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.