You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under Craft CMS 5.5.3 and associated plugins (see dependencies listed below), the account activation process consistently redirects users to /login, regardless of previous configurations or expectations. To further investigate, I tested avoiding the 404 error in devMode by creating a /login template and adding the line {{ d(currentUser) }} at the start. This consistently outputs null, which confirms that autoLoginAfterAccountActivation is not functioning as expected.
This issue occurs despite enabling the autoLoginAfterAccountActivation(true) configuration. The expected behavior is to redirect users to the e-shop/account/orders page (if logged in) or e-shop/account/sign-in page (if not logged in), without explicitly defining these paths. These are static paths unrelated to account activation, and this functionality worked without issue until now. Specifying the login URL via the loginPath configuration parameter does not resolve the problem either, and the activation process consistently redirects to /login.
To avoid the 404 error in devMode, I created a /login template and added the following line at the beginning of the template:
{{ d(currentUser) }}
This outputs null, indicating that autoLoginAfterAccountActivation is not working as expected.
In production mode (with devMode disabled), the activation request does not throw visible errors but fails silently. These are static paths unrelated to account activation, and this functionality worked without issue until now. Specifying the login URL via the loginPath configuration parameter does not resolve the problem either. Logs anonymized for privacy (below) show a warning indicating a possible misconfiguration or resolution error.
Steps to reproduce
Enable autoLoginAfterAccountActivation in the Craft CMS configuration.
Attempt to activate a user account using the activation link sent via email.
Observe that users are redirected to /login instead of completing the activation process.
Check logs for relevant errors or warnings.
Expected behavior
Upon clicking the account activation link, the account should be activated successfully.
If the user is already logged in, they should be redirected to e-shop/account/orders.
If the user is not logged in, they should be redirected to e-shop/account/sign-in.
Explicit configuration of these paths should not be necessary, as they worked without issue previously.
Actual behavior
Clicking the activation link redirects to /login, regardless of user authentication status.
Activation does not complete successfully.
Errors in logs suggest a request resolution issue within the Craft CMS routing system.
2024-12-24 12:22:35 [web.WARNING] [application] Request context: {"environment":"production","vars":{"_GET":{"code":"<activation_code>","id":"<user_id>"},"_POST":[],"_FILES":[],"_COOKIE":{"CraftSessionId":"<session_id>","_ia":"<ia_value>","CRAFT_CSRF_TOKEN":"<csrf_token>"},"_SESSION":{"error":"Erreur lors de l’activation de votre compte"},"_SERVER":{"REQUEST_URI":"/en/verifyemail?code=<activation_code>&id=<user_id>","REQUEST_METHOD":"GET","SERVER_PROTOCOL":"HTTP/1.1","CRAFT_ENVIRONMENT":"production","HTTP_HOST":"<host>","HTTPS":"on"}}}
Craft CMS version
5.5.3
PHP version
8.2.24
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
What happened?
Description
Under Craft CMS 5.5.3 and associated plugins (see dependencies listed below), the account activation process consistently redirects users to
/login
, regardless of previous configurations or expectations. To further investigate, I tested avoiding the 404 error indevMode
by creating a/login
template and adding the line{{ d(currentUser) }}
at the start. This consistently outputsnull
, which confirms thatautoLoginAfterAccountActivation
is not functioning as expected.This issue occurs despite enabling the
autoLoginAfterAccountActivation(true)
configuration. The expected behavior is to redirect users to thee-shop/account/orders
page (if logged in) ore-shop/account/sign-in
page (if not logged in), without explicitly defining these paths. These are static paths unrelated to account activation, and this functionality worked without issue until now. Specifying the login URL via theloginPath
configuration parameter does not resolve the problem either, and the activation process consistently redirects to/login
.In
devMode
, the following error appears:To avoid the 404 error in
devMode
, I created a/login
template and added the following line at the beginning of the template:This outputs
null
, indicating thatautoLoginAfterAccountActivation
is not working as expected.In production mode (with
devMode
disabled), the activation request does not throw visible errors but fails silently. These are static paths unrelated to account activation, and this functionality worked without issue until now. Specifying the login URL via theloginPath
configuration parameter does not resolve the problem either. Logs anonymized for privacy (below) show a warning indicating a possible misconfiguration or resolution error.Steps to reproduce
autoLoginAfterAccountActivation
in the Craft CMS configuration./login
instead of completing the activation process.Expected behavior
e-shop/account/orders
.e-shop/account/sign-in
.Actual behavior
/login
, regardless of user authentication status.Dependencies
Anonymized Logs
Craft CMS version
5.5.3
PHP version
8.2.24
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: