"This line is not logically reachable", except...
This is a very minimal bug report because I don't have enough information, but because it's an unusual error message to see, I want to file it in case anyone else goes searching for it.
I got a warning Deprecated function CRM_Event_Form_Registration_Confirm::postProcess, use This line is not logically reachable.
, followed immediately by a fatal error Cannot find participant ID
.
- It looks like this person registered 3 participants.
- They were almost certainly using a link that included
cid=0
(aka "Not this person? Click here"). - Participant 2 has the correct
registered_by_id
and Participant 3 has noregistered_by_id
, which is where I suspect the error is creeping in.
It's the end of my day but I'll try to replicate more comprehensively tomorrow.
+------+------------+----------+-----------+---------+---------------------+------------------------------------------------+---------------------------------------------------------+---------+--------------+------------+------------------+-------------+--------------+-------------+-----------------+---------+-----------+---------------------------+
| id | contact_id | event_id | status_id | role_id | register_date | source | fee_level | is_test | is_pay_later | fee_amount | registered_by_id | discount_id | fee_currency | campaign_id | discount_amount | cart_id | must_wait | transferred_to_contact_id |
+------+------------+----------+-----------+---------+---------------------+------------------------------------------------+---------------------------------------------------------+---------+--------------+------------+------------------+-------------+--------------+-------------+-----------------+---------+-----------+---------------------------+
| 2386 | 1981 | 100 | 1 | 1 | 2022-09-01 14:55:05 | Online Event Registration: 2022 Annual Meeting | 1st, 2nd or 3rd Attendee - 1 (multiple participants) | 0 | 1 | 0.00 | NULL | NULL | USD | NULL | NULL | NULL | NULL | NULL |
| 2387 | 490 | 100 | 1 | 1 | 2022-09-01 14:55:05 | Online Event Registration: 2022 Annual Meeting | 1st, 2nd or 3rd Attendee - 1 | 0 | 1 | 0.00 | 2386 | NULL | USD | NULL | NULL | NULL | NULL | NULL |
| 2388 | 1926 | 100 | 1 | 1 | 2022-09-01 14:55:05 | Online Event Registration: 2022 Annual Meeting | 1st, 2nd or 3rd Attendee - 1 | 0 | 1 | 0.00 | NULL | NULL | USD | NULL | NULL | NULL | NULL | NULL |
+------+------------+----------+-----------+---------+---------------------+------------------------------------------------+---------------------------------------------------------+---------+--------------+------------+------------------+-------------+--------------+-------------+-----------------+---------+-----------+---------------------------+
Sep 01 14:55:05 [warning] Deprecated function CRM_Event_Form_Registration_Confirm::postProcess, use This line is not logically reachable..
CRM_Core_Error::deprecatedFunctionWarning
CRM_Event_Form_Registration_Confirm::postProcess
CRM_Core_Form::mainProcess
CRM_Core_StateMachine::perform
Array
(
[civi.tag] => deprecated
)
Sep 01 14:55:05 [error]
$Fatal Error Details = array:3 [
"message" => "Cannot find participant ID"
"code" => null
"exception" => CRM_Core_Exception {#9916
-errorData: array:1 [
"error_code" => 0
]
#cause: null
-_trace: null
#message: "Cannot find participant ID"
#code: 0
#file: "/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Event/BAO/Event.php"
#line: 1765
trace: {
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Event/BAO/Event.php:1765 {
› if (!$participantId) {
› throw new CRM_Core_Exception(ts('Cannot find participant ID'));
› }
}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php:788 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:573 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php:144 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:43 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/civicrm.php:1199 { …}
/var/www/www.mysite.org/web/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { …}
/var/www/www.mysite.org/web/wp-includes/class-wp-hook.php:307 { …}
/var/www/www.mysite.org/web/wp-includes/class-wp-hook.php:331 { …}
/var/www/www.mysite.org/web/wp-includes/plugin.php:524 { …}
/var/www/www.mysite.org/web/wp-includes/class-wp.php:787 { …}
/var/www/www.mysite.org/web/wp-includes/functions.php:1330 { …}
/var/www/www.mysite.org/web/wp-blog-header.php:16 { …}
/var/www/www.mysite.org/web/index.php:17 { …}
}
}
]