Closed (fixed)
Project:
Login Destination
Version:
8.x-2.0-beta1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2021 at 12:35 UTC
Updated:
1 May 2025 at 08:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rkollerI've noticed the same when testing the module today for the first time. I've set up the triggers to
LoginandLogoutand the Redirect destination to<current>. Pages is set toAll pages, language toAll languagesand roles to all available roles (AuthenticatedandAdministrator).If I am on
/node/2now and log out i get redirected to/node. Same the other way around if i am on/node/2 and try to log in i get redirected also to/node. I would expect that the redirection would point to/node/2againTested on Drupal 9.2.6 running on DDEV with PHP 7.4.23 andnginx/1.20.1
Comment #3
gaurav.kapoor commentedI think for this scenario it is better to use destination query. You can write a simple JS which will set destination query parameter in login and logout link to current page and thus use core provided behavior for redirection.
Comment #4
sriharsha.uppuluri commentedI'm also facing the similar issue created the patch by using the getPathInfo.
Comment #6
satya.eedeti commentedThe patch #4 works very well but somehow it is failing with domains with base path. For example, we have two sites example.com (base site) and example.com/IN-en (country site). If we login from country site, then it is getting redirected to base site, as getPathInfo omits the base path. The patch attached here is working fine for both sites/scenarios.
Comment #7
jon.lund commentedMy installation was working fine until Core 9.4.5 update. Now this module seems broken. My users are very used to being redirected to the current page upon login. I have been using this module for about 8 years. I am hopeful a fix is forthcoming.
Comment #8
andrenoronha commentedNot working for me either. I'm using Drupal 9.5.2 and o365 to authenticate users.
It seems to recognize /login as the current page.
Comment #9
heliogabalI tested the patch and the redirect to
<current>is working again after applying the patch (#6) on Drupal 9.4.12.Comment #10
grahamshepherd commentedPatch #6 does not work for me.
Drupal 9.5.8
Login_destination 8.x-2.0-beta6
Redirect set to for login redirects to user page and logout to the home page.
If I try and use token: /[current-page:url:path] the website reports an error.
Comment #11
grahamshepherd commentedPatch #4 doesn't work either.
Comment #12
proweb.ua commented#6 does not work
Comment #13
nikhil_110 commentedAttached patch against Comment #10, #11, #12
Comment #16
gaurav gupta commentedComment #17
rakesh.regarI have tested these changes and it works fine.
But this change disable cache for user account block, for people using page as destination we can use this but for people who are not using as detination, it is not recommanded.
Disabling cache will reduce performance, better solution would be having some kind of check using which it can be determind if a user have set redirection to the current page only then we should stop caching this block.
Comment #19
manish-31 commentedI have updated the ! MR 17, needs review.
Instead of disabling caching for the account block added cache contexts for
url.path.We don't need any check to confirm if destination rules have
<current>path redirection or not as caching will happen based on the path.Comment #20
sourabhsisodia_ commentedTested the MR!, user after logging in is redirected to the current path. The MR is also working for other paths. RTBC++
Comment #21
sourabhsisodia_ commentedComment #24
rsvelko commentedThanks all for the report and MR.
I've just merged and it's now into the dev branch.
My next step is to look for other RTBC-s, test them and group them into new release 8.x-2.0-beta7.
Comment #25
manish-31 commentedHi @rsvelko,
Thanks for merging the MR.
I noticed that I wasn't credited for resolving this issue. I'm not sure why that happened. Is there something I'm missing?
Comment #27
rsvelko commentedGiving credit. Thanks everyone.
Comment #28
shadab majid commentedI have applied this patch but its not working.