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

Classic UI: login modal does not redirect correctly #4100

Open
petschki opened this issue Feb 3, 2025 · 6 comments
Open

Classic UI: login modal does not redirect correctly #4100

petschki opened this issue Feb 3, 2025 · 6 comments

Comments

@petschki
Copy link
Member

petschki commented Feb 3, 2025

Since this fix #4094 the login redirects to the portal url when coming from a "not found" page. If pat-plone-modal is enabled for the login action the options should be set to {"actionOptions": {"redirectOnResponse": true}}

@petschki
Copy link
Member Author

petschki commented Feb 3, 2025

Seems like it was there but got removed in favor of not using the modal at all. But providing an empty {} in the options does not deactivate it.

5953228

@mauritsvanrees
Copy link
Member

Just checking here to see if this is a regression in the release candidate, or in the code merged this week, or if this was already there for a longer time. I think the last.

  • In any 6.1 alpha/beta/rc version so far, if you are anonymous, and go to a non-existing page, and then click the login link, nothing happens: the login modal stays open. 6.1.0rc1 did not change anything here.
  • Since PR Fixes login behaviour on 404 page #4094 was merged, the modal closes, so that is an improvement.
  • Now the problem remains that it still seems as if the login did not happen, and you are not redirected to the homepage.

So if I understand correctly, this is no regression. Once released, there is an improvement, but there is room for more improvement afterwards. So this should not hold up a release.

@petschki Do I see this correctly?

@petschki
Copy link
Member Author

petschki commented Feb 7, 2025

@mauritsvanrees correct. This is the follow up issue to fix the modal redirection #4100 ... but there is one downside, that the portal message gets lost when the modal redirects to the response URL. This needs to be fixed in mockup.

@petschki
Copy link
Member Author

petschki commented Feb 7, 2025

sorry ... we're already in this issue ... didn't check that 🙈

@mauritsvanrees
Copy link
Member

Thanks.

I just tried the fix from PR #4094 on my personal live site, just to see if VirtualHosting trips up the logic, but that works fine. And I my case I do properly get redirected to the homepage, because I still have the old settings in the Login action modal options:

{"title": "Log in", "width": "26em", "actionOptions": {"redirectOnResponse": true}}

I'm not sure what the reason was for changing this to an empty dict, nor why I have the old settings. :-D

Indeed the portal message is not shown, also not after clicking to go to another page. But at least it is pretty clear that you are logged in, because you don't linger anonymously on a not-found page.

@petschki
Copy link
Member Author

petschki commented Feb 7, 2025

I remember talking with @agitator about the login modal. At some point we decided to deactivate it completely manly because of the portalMessage problem. But the empty dict did't deactivate it at all (which I wasn't aware of) ... so long story short: I think its better to correctly configure the modal and fix the missing portalMessage when redirecting, because this is another issue here too #4044

@jensens jensens moved this to in progress in Alpine City Sprint 2025 Feb 12, 2025
@petschki petschki moved this from in progress to Planned in Alpine City Sprint 2025 Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants