diff --git a/CRM/Core/Controller.php b/CRM/Core/Controller.php index 724c7922731..7e35029d1f4 100644 --- a/CRM/Core/Controller.php +++ b/CRM/Core/Controller.php @@ -858,8 +858,8 @@ public function invalidKey() { } public function invalidKeyCommon() { - $msg = ts("We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.") . '

' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '

' . ts('Error type: Could not find a valid session key.'); - throw new CRM_Core_Exception($msg); + throw new CRM_Core_Exception( + ts("Sorry, your session has expired. Please reload the page or go back and try again."), 419, ts("Could not find valid session key.")); } /** @@ -875,7 +875,7 @@ public function invalidKeyRedirect() { if (!empty($url_parts['query'])) { $redirect_url .= '?' . $url_parts['query']; } - CRM_Core_Session::setStatus(ts('Your browser session has expired and we are unable to complete your form submission. We have returned you to the initial step so you can complete and resubmit the form. If you experience continued difficulties, please contact us for assistance.')); + CRM_Core_Session::setStatus(ts('Sorry, your session has expired. Please resubmit your information to complete your submission.')); return CRM_Utils_System::redirect($redirect_url); } } diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index 89965a18a60..4ad14804e92 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -574,8 +574,7 @@ public function addExpectedSmartyVariables(array $elementNames): void { } public function invalidKey() { - $msg = ts("We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.") . '

' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '

' . ts('Error type: Could not find a valid session key.'); - throw new CRM_Core_Exception($msg); + throw new CRM_Core_Exception(ts("Sorry, your session has expired. Please go back and try again."), 419, ts("Could not find valid session key.")); } } diff --git a/templates/CRM/common/fatal.tpl b/templates/CRM/common/fatal.tpl index 4312471324b..81000e9d423 100644 --- a/templates/CRM/common/fatal.tpl +++ b/templates/CRM/common/fatal.tpl @@ -33,7 +33,6 @@ {/if}
- {ts}Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.{/ts}
{$message|escape}
{if !empty($error.message) && $message != $error.message}