mlutfy / reporterror

Sends you a detailed email when a CiviCRM fatal error occurs.
https://lab.civicrm.org/extensions/reporterror
9 stars 7 forks source link

Handle Event "Could not find valid value for id" when HTTP Referer exists #25

Open mlutfy opened 6 years ago

mlutfy commented 6 years ago

I suspect these are caused by QuickForm session errors. However, they can be difficult to reproduce in 4.7 (they were pretty common in 4.6 because of the cleanup jobs).

When this error happens, we should redirect back to the event page, with a session timeout message.

Example:

HTTP_REFERER:       https://civicrm.org/civicrm/event/register?id=1155&reset=1
***BACKTRACE***
#0 /var/aegir/platforms/civicrm-org/sites/civicrm.org/civiext/ca.bidon.reporterror/reporterror.php(251): reporterror_civicrm_generatereport("CiviCRM", (Array:2), NULL, (Array:0))
#1 /var/aegir/platforms/civicrm-org/sites/all/modules/civicrm/CRM/Core/Error.php(365): reporterror_civicrm_handler((Array:2))
#2 /var/aegir/platforms/civicrm-org/sites/all/modules/civicrm/CRM/Utils/Request.php(120): CRM_Core_Error::fatal("Could not find valid value for id")
#3 /var/aegir/platforms/civicrm-org/sites/all/modules/civicrm/CRM/Event/StateMachine/Registration.php(52): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE)
#4 /var/aegir/platforms/civicrm-org/sites/all/modules/civicrm/CRM/Event/Controller/Registration.php(47): CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), TRUE)
#5 /var/aegir/platforms/civicrm-org/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false")