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

Message "You have been redirected ..." not seen when it occurs #36

Open
izmeez opened this issue Oct 11, 2024 · 4 comments
Open

Message "You have been redirected ..." not seen when it occurs #36

izmeez opened this issue Oct 11, 2024 · 4 comments
Labels
needs - more feedback This issue needs more input from others type - bug report Something isn't working

Comments

@izmeez
Copy link
Contributor

izmeez commented Oct 11, 2024

This was previously mentioned in #25 as a side issue.

When on a subdomain go to /admin/structure/domains and edit one of the domains. User is redirected to the primary domain but does not see the message they have been redirected. Only when user goes back to the subdomain, with the browser back button, and flushes caches the message is displayed, You have been redirected: This page must be accessed from the primary domain. This message seems out of place. It probably should appear on the primary domain when user is redirected.

@izmeez izmeez added the type - bug report Something isn't working label Oct 11, 2024
@sudipto68
Copy link
Contributor

@izmeez I can recreate this issue and am trying to solve this issue but I think, In Backdrop CMS messages set with backdrop_set_message() are stored in the session, which means they should persist across requests, including redirects within the same domain. However, when redirecting to another domain, Backdrop doesn’t automatically share session data across domains, so the messages may not be available on the primary domain after a cross-domain redirect.

@izmeez
Copy link
Contributor Author

izmeez commented Nov 12, 2024

Interestingly, after the domain_theme module is enabled this behaves as expected. The message You have been redirected: This page must be accessed from the primary domain. shows on the primary domain after the redirect has occurred.

Should note that I did login to the primary domain prior to visiting the subdomain and as an administrator, so the correct behaviour may have nothing to do with enabling domain_theme and be related to the session.

@sudipto68
Copy link
Contributor

@izmeez I have domain_theme module already enabled but in my case, it didn't work.

@izmeez
Copy link
Contributor Author

izmeez commented Nov 12, 2024

How silly of me, it has nothing to do with domain_theme. The fix has to do with #39 and the PR #46 that I had applied.

@izmeez izmeez added the needs - more feedback This issue needs more input from others label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs - more feedback This issue needs more input from others type - bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants