Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
* set unified login
* as anonymous goto user/register
* switch to user/login and enter wrong credentials
expected: retry at user/login
what happens: you see user/register
Comments
Comment #1
geek-merlintrivial patch flying in.
additionally this
* redirects you to where you came from after login/register
Comment #2
Soren Jones CreditAttribution: Soren Jones commentedThe patch in #1 fixes this bug for me and preserves the destination. Thank you very much.
Comment #3
geek-merlinso tested
Comment #4
Soren Jones CreditAttribution: Soren Jones commentedRe: #1
Go to user/register
Click Create new account
The destination is set to user/register
The same issue occurs at user/login with the destination set to user/login.
An updated patch is attached, butcould this be handled in JavaScript instead?EDIT: Don't use the attached patch.
Comment #5
Soren Jones CreditAttribution: Soren Jones commentedComment #6
geek-merlinreviewed soren's improvement #5 of my patch #1:
it contains a cure for the pathological case of redirecting to user/login after user/login which is supposed to return "access denied".
same for user/register.
rest is unchanged, so setting to rtbc.
Comment #7
hunmonk CreditAttribution: hunmonk commentedpatch no longer applies.
Comment #8
setvik CreditAttribution: setvik commentedPatch rerolled against master. Nothing else changed. Setting to rtbc.
Comment #9
hunmonk CreditAttribution: hunmonk commentedi don't think i want the destination handling in there, what's the use case? #1172652: Show unified login on Access Denied handles the problem for 403 and preserves destination.
Comment #10
bensey CreditAttribution: bensey commentedHi there,
is anything happening here? I have the opposite happening to the initial post.
Issue is the same though, it's not returning to the form that was submitted.
Eg.
Create new account with non-matching passwords.
Form fails validation returning to login form with password field highlighted.
User needs to click the 'create new account' button to get back to the correct form and see highlighted fields.
Comment #11
AaronBaumanPatch in #8 doesn't work when the form is rendered on 403 pages.
There's no need to involve destination handling whatsoever.
The active form is set with javascript, so the fix is wholly javascript.
Comment #12
AaronBaumanfixed trailing whitespace
Comment #13
codesidekick CreditAttribution: codesidekick commentedThe patch in #12 works except if a user goes to /user/register, clicks on the log in tab, and doesn't pass the login validation - in that situation they are still redirected to the registration form instead of the failed login form.
The patch attached adds a check on the user form for validation as well using the same method. I made the comment above the check a bit more generic as well to describe both checks.
Comment #14
stevecowie CreditAttribution: stevecowie commentedHave tested the patch from #13 and confirm it fixes the issue. Could do with another confirmation before committing.
Comment #15
lklimek CreditAttribution: lklimek commented#13 seems to work for me, but I didn't test it thoroughly.
Comment #16
PawelR CreditAttribution: PawelR commented#13 also works for me
Comment #17
Sinan Erdem CreditAttribution: Sinan Erdem commented#13 also work for me. I tried many cases, it seems it is working for all.
Comment #18
codesidekick CreditAttribution: codesidekick commentedSo marked as reviewed & tested by the community - just need a project maintainer to integrate the patch.
Comment #19
chrisnovak CreditAttribution: chrisnovak commented#13 works for me. Can get this integrated into the module?
Comment #20
FiNeX CreditAttribution: FiNeX commented#13 works for me too. Thanks for the patch. +1 for commit :-)
Comment #21
david_garcia CreditAttribution: david_garcia commented#13 works for me too. Thanks for the patch. +1 for commit :-)
Comment #22
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm seeing this issue on a site with an address field. When it does the ajax call to update the state/province field (after the user has selected country), it reverts back to the other tab. Is there a way to fix this issue more broadly here or should I submit a new issue?
Edit: yes I tried the patch, but the validation hasn't fired yet when I encounter this issue.
Comment #23
david_garcia CreditAttribution: david_garcia commented@Ryan Weal: Tabs lost after ajax submit is another matter. Check this out: https://drupal.org/node/1342262.
Comment #24
dooug CreditAttribution: dooug at Promet Source commentedApplied patch from comment #13 to the latest 7.x-1.x-dev. This resolved the problem. Many thanks. RTBC++
Comment #25
calebtr CreditAttribution: calebtr commented#13 applies to 7.x-1.x-dev. RTBC++
Comment #26
Anonymous (not verified) CreditAttribution: Anonymous commentedThx 13# worked for me too.
Comment #27
codesidekick CreditAttribution: codesidekick commented(from 2 years ago!!!) What's stopping this from being committed?
Comment #28
dooug CreditAttribution: dooug at Promet Source commentedI reached out to @Stevecowie the maintainer, he seems busy and was open to getting assistance in maintaining LT. However, I have not heard back from him since. So it seems this module isn't being maintained until he grants someone else access to do so. I have offered, but haven't heard back.
Comment #30
dooug CreditAttribution: dooug at Promet Source commentedComment #32
MahmoodZidan CreditAttribution: MahmoodZidan commented#13 works. Thanks a lot :)