// current contribution page id
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
if (!$this->_id) {
- $pastContributionID = $session->get('pastContributionID');
- if (!$pastContributionID) {
- CRM_Core_Error::fatal(ts('We can\'t load the requested web page due to an incomplete link. This can be caused by using your browser\'s Back button or by using an incomplete or invalid link.'));
- }
- else {
- CRM_Core_Error::fatal(ts('An error occurred during form submission. This page requires form data to be submitted for processing and no form data was submitted or processed. We are sorry for any inconvience. Please click <a href=\'%1\'>here</a> to visit the contribution page and re-start the contribution process.', array(1 => CRM_Utils_System::url('civicrm/contribute/transact', 'reset=1&id=' . $pastContributionID))));
- }
- }
- else {
- $session->set('pastContributionID', $this->_id);
+ // seems like the session is corrupted and/or we lost the id trail
+ // lets just bump this to a regular session error and redirect user to main page
+ $this->controller->invalidKeyRedirect();
}
+
// this was used prior to the cleverer this_>getContactID - unsure now
$this->_userID = $session->get('userID');
*/
public function invalidKeyRedirect() {
if ($this->_entryURL) {
- CRM_Core_Session::setStatus(ts('We need a simple clear error message here'));
+ CRM_Core_Session::setStatus(ts('We have lost your user session and are unable to complete your form submission. We have returned you to the initial step in the form which you can complete and resubmit. If you experience continued difficulties, please contact us for assistance.'));
return CRM_Utils_System::redirect($this->_entryURL);
}
else {