Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#5610 Simplifying the session cookie message to make it more readable #31638

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CRM/Core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.") . '<br /><br />' . 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.') . '<br /><br />' . 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."));
}

/**
Expand All @@ -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.'));
shaneonabike marked this conversation as resolved.
Show resolved Hide resolved
return CRM_Utils_System::redirect($redirect_url);
}
}
Expand Down
3 changes: 1 addition & 2 deletions CRM/Core/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.") . '<br /><br />' . 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.') . '<br /><br />' . 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."));
}

}
1 change: 0 additions & 1 deletion templates/CRM/common/fatal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
</style>
{/if}
<div class="messages status no-popup"> <i class="crm-i fa-exclamation-triangle crm-i-red" aria-hidden="true"></i>
<span class="status-fatal">{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}</span>
<div class="crm-section crm-error-message">{$message|escape}</div>
{if !empty($error.message) && $message != $error.message}
<hr style="solid 1px" />
Expand Down