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.
I have setup a destination, and it works fine when I login from the login page (user/login), but I have a login block on the front page and when I login from there, it redirects to the default front page as set in admin/config/system/site-information
Is there something I need to do to make it work?
Comments
Comment #1
mithy CreditAttribution: mithy commentedCheck the "preserve destination" setting.
Comment #2
spineless CreditAttribution: spineless commentedThis module does not work.
I entered the destination rule and with the "Preserve destination" selected either on or off I still do not get redirected to the page with the login link.
I have also attempted to use the login in "Block" and that does not work either.
I am using oneall social login module and I notice that when I have your module enabled it interferes with the redirect provided by oneall social login. So I know your module is interacting with other modules but I have not been able to get it to work.
Comment #3
spineless CreditAttribution: spineless commentedI am using the standard Drupal registration and login block and when I login using the block I can be redirected back to the page. However when I register a new user the last page I see in the user/%/edit page. I cannot get the module to work so it redirects to the or last page visited.
I set the "preserve destination" to both on and off. This switch has no effect.
I think this module ( login_destination-7.x-1.0.tar) is broken. It does not work with the login block.
Comment #4
mithy CreditAttribution: mithy commentedIt does not help much writing that the module is broken. It works perfectly for most of the users (the functionality you are mentioning also). From your description I cannot understand whether it is the login block or the registration page that is causing the trouble. Please fill a proper bug report, provide the steps you went through, specify the configuration you have. Try to isolate the cause by switching off other modules that might interfere with LD.
Comment #5
spineless CreditAttribution: spineless commentedI created a test site for the troubleshooting of this module. I am using Drupal 7.16 and Login Destination 7.x-1.0
I only have the following modules added.
admin_menu
book_made_simple
Entity
Rules
Login_destination
All of these modules have been disabled except your module.
I created a book with 3 pages.
I configured a new login_destination rule with the following parameters.
... redirect to page:
... redirect upon trigger: login, registration, one-time login link
... all other parameters were left empty.
I configured the login_destination setting
... I did not click on "Preserve the destination parameter"
... I did click on "Redirect immediately after using one-time login link"
I saved the configuration and logged out as the administrator.
I then navigated to node/112 (Example Book) and created a new account. I assume that I will return back to node/112.
I entered the username, email and password for the new user and clicked on save.
I was then directed to the user edit page. I clicked on save....
I never returned to node/112
Please go to the development website I set up for this test and see for yourself.
http://devpro.pinterec.ca
Admin credentials
... user: devpro
... password: ZX12qw
Comment #6
spineless CreditAttribution: spineless commentedI updated the version on this site to 7.x-1.1+2-dev so as to be working with the latest version.
The issue still exists.
spineless
Comment #7
spineless CreditAttribution: spineless commentedI did some more testing and was able to narrow down the issue to a single problem.
I created a new install of Drupal 7.17 and installed login-destination 7.x-1.0-dev.tar.gz.
I set up the following:
config/people accounts so that any visitor could register without any approval.
config/people/login-destination/settings with redirect immediately after using one-ime login link
I set up a login destination rule so all pages and all users would be redirected to the page.
I then created a page and navigated to that page.
I created a new account using the blocks login form -> the result was I ended up at the user account edit page.
I created another user account using the link "register" at the bottom of the page. -> the result was I ended up at the user account edit page.
I then added the following:
config/people/login-destination/settings with "preserve the destination parameter"
I repeated the above test and again when I register a new user using the login block it does not work. However, when use the link "register" at the bottom of the page I get redirected to the current page as I hoped.
Now, just to be sure I did go back and attempt to login ( not register a new user) and everything appears to work ok including login in from the login block.
________
Conclusion
When you attempt to register a new user using the LOGIN block the module does not redirect the user back to the page.
Hope this helps.
spineless
Comment #8
ddrozdik CreditAttribution: ddrozdik as a volunteer commentedI tried reproduce this issue on the latest version of module, and module works good. I guess issue could be closed as it is not reproducible.
Comment #9
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedHere is what I'm seeing....
If you set redirection to a specific page (i.e.
node/5
), redirect from register works fine. However, if you set redirection to<current>
, then register doesn't redirect. If you look at the front-end, login links are appended with the current page (i.e.user/login?current=node/5
), however register links are not. If you go touser/register?current=node/5
, then you will get redirected tonode/5
just fine. If you install Login Toboggan and check the box for unified login/registration page and access that page viauser/login
oruser
, you will get redirected properly as well.For whatever reason, it appears as though if you set the alter flag in hook_menu_link_alter, it doesn't call hook_translated_menu_link_alter for the user/register page.
Comment #10
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commentedA potential work around is to put something like this into your template.php file:
Comment #11
chanderbhushan CreditAttribution: chanderbhushan as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedTested with 7.x-1.x branch redirect is working fine for internal and external links for both user/login page and block