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.
Login Destination was working great for me with version 6.x-2.1 but when I updated to 6.x-2.3 it completely stopped working. Rechecked settings, ran update php, no luck. I have it set to redirect to the site's front page after login and that's what's no longer happening. Had to revert back to 2.1, and after doing so it's working fine again.
Comment | File | Size | Author |
---|---|---|---|
#38 | README_issue_341683_comment_38.patch | 2.15 KB | Francewhoa |
#29 | ld-settings.png | 68.09 KB | Francewhoa |
#15 | 341683-15-eojthebrave_destination_not_set.patch | 756 bytes | eojthebrave |
Comments
Comment #1
aaront CreditAttribution: aaront commentedforgot to mention - running it on drupal 6.6
Comment #2
Kakulash CreditAttribution: Kakulash commentedSame here.
Running on 6.6 as well
Comment #3
Eidolon NightAgreed, not working in Drupal 6.2 either.
Comment #4
piersg CreditAttribution: piersg commentedAh so that's why it's stopped working - had tried all sorts, disabling other modules, re-installing. I'll roll back to 2.1... all working again. On drupal 6.6.
Comment #5
toddwoof CreditAttribution: toddwoof commented6.x-2.3 doesn't work in 6.7, either -- or, at least not on my site. I also reverted to 2.1.
Any ideas on this? Seems strange that it would simply not work, since presumably people are using it -- so I'm wondering if there is some known conflict, or some type of conflict that I should be looking for in my site in particular. Thanks!
Comment #6
thulstrup CreditAttribution: thulstrup commentedI had the same problem with 6.x-2.3.
Unchecking the "Preserve destination" checkbox fixed the problem.
Comment #7
rjb CreditAttribution: rjb commentedThe solution at #6 works for me. Thanks for posting!
Comment #8
toddwoof CreditAttribution: toddwoof commentedSolution in #6 does not work on my site.
Details: I have pages where you need to log in to sign up for an event, or post something. I want to show a block that says "you need to login first," with a link to login; and I want the user to return to the same page they were on, so they don't have to navigate back to the page to continue.
In 6.x-2.1 I can use the solution here: http://drupal.org/node/225890 (see comment #7) and it works perfectly.
In 6.x-2.3 it fails, whether or not "preserve destination" is checked, and instead the user is sent to the user page.
Comment #9
taldy CreditAttribution: taldy commentedWe tested this on Drupal 6.8 and everything works correctly.
1. Could it be a conflict with any of your modules?
2. Be sure destination attribute is set in the URL when you are visiting the login page.
Comment #10
mbiddlecombe CreditAttribution: mbiddlecombe commentedcould you give a bit more detail about point 2? how do you set destination attribute
Comment #11
Tobias Weibel CreditAttribution: Tobias Weibel commentedHi
I do have the same problem here. Solution #6 works for me.
Installation:
Drupal 6.9
Modules:
- ACL 6.x-1.0-beta4
- Advanced help 6.x-1.1
- Backup and Migrate 6.x-1.2
- Calendar 6.x-2.0-rc6
- CAPTCHA 6.x-1.x-dev (2008-Nov-21)
- Content Construction Kit (CCK) 6.x-2.1
- Content Access 6.x-1.0
- Date 6.x-2.0-rc6
- Email Field 6.x-1.1
- Image 6.x-1.0-alpha4
- Image Assist 6.x-2.0-alpha2
- Login Destination 6.x-2.3
- Poormanscron 6.x-1.x-dev (2008-Dez-29)
- Role Delegation 6.x-1.0
- SpamSpan filter 6.x-1.2
- Token 6.x-1.11
- Upload path 6.x-1.0
- User Read-Only 6.x-1.x-dev (2008-Sep-17)
- User Protect 6.x-1.2
- Views 6.x-2.2
- Wysiwyg API 6.x-0.5
Tobias
Comment #12
kinderpera CreditAttribution: kinderpera commentedsame problem; anyway solution #6 works here
Comment #13
mkruisselbrink CreditAttribution: mkruisselbrink commentedsame problem here. the problem seems to be in the following code in login_destination_apply_redirect():
This will always return false if no destination is set, and thus no redirection to the proper login destination will take place.
Comment #14
svdoord CreditAttribution: svdoord commentedI think mkruisselbrink (#13) is right. In the previous revision of login_destination.module, it said:
I can understand why there is now a check that the destination must be different than the current page, but I think the !empty check should still be there...
In other words, I think the line should read:
Comment #15
eojthebrave@svdoord's code from #14 does the trick for me. Here's a simple patch that implements the fix.
Comment #16
davemybes CreditAttribution: davemybes commented+1 for this patch. Works in D6.12. The module simply does not work without this patch.
Comment #17
psynaptic CreditAttribution: psynaptic commentedI found this module was not redirecting at all. I ended up using Rules module:
http://drupal.org/node/298506
Comment #18
rgraves CreditAttribution: rgraves commentedI applied the patch from #14, but it did not work. Here's what I'm doing:
Preserve destination: checked
PHP Snippet: checked
URL: return "http://". $_SERVER['HTTP_HOST'];
I suspect it's because I'm using a full URL instead of a path without the domain.
I use this code because my login page is under https and before I installed Login Destination, it was always redirecting to my homepage to https://www.mydomain.com. Then publishers were inserting URLs in their pages with the https instead of http. It wasn't a huge problem, but I didn't want them doing that. This code worked in Drupal 5, but not in Drupal 6.12.
Is there another way I can accomplish redirecting to and http version of my homepage?
Comment #19
davemybes CreditAttribution: davemybes commentedYou can try using Secure Pages module: http://drupal.org/project/securepages.
Comment #20
mckeen_greg CreditAttribution: mckeen_greg commentedThe Patch in #15 works for me. :)
Comment #21
FrancewhoaRelated issue and module maintainer reply: http://drupal.org/node/292006#comment-970509
Comment #22
agerson CreditAttribution: agerson commentedYes, #15 works.
Comment #23
chrisck CreditAttribution: chrisck commented#6 worked for me too.
Comment #24
rsvelko CreditAttribution: rsvelko commentedplease try if this issue is reolved with 2.5
mark it as fixed if it IS fixed.
Comment #25
rsvelko CreditAttribution: rsvelko commentedif not fixed - change it back to active... I guess it is fixed now.
Comment #26
FrancewhoaConfirming that 6.x-2.5 works.
Thanks rsvelko
Comment #27
toddwoof CreditAttribution: toddwoof commented6.x-2.5 does not work for me.
In 6.x-2.1 I can send a user back the page they were on.
Has anyone successfully used 6.x-2.5 to send someone back to the same page they were on; and if so, would you be willing to post exactly what goes in each box of the Login Destination settings page? Thanks!
Comment #28
Francewhoa@toddwoof: Find attached settings screenshot. With this settings when users log-in they are redirect to a specific URL. Could be any URL. Such as
<front>
for front page ornode/category/page-title-here
.For example
node/category/page-title-here
would redirect tohttp://your-domain-name-here.com/node/category/page-title-here
Comment #29
FrancewhoaAttaching screenshot.
Comment #30
toddwoof CreditAttribution: toddwoof commentedMaybe I'm missing something, or didn't describe the need properly.
I don't want to redirect the user to a specific page. I want to redirect them to whatever page they were on when they logged in. If they're on the home page and they log in, I want to redirect them to the home page. If they're on some event listing page and they log in, I want to redirect them to the event page they were on; and so on.
The purpose is to allow the user to log in and not lose their place. Sometimes they want to log in to register for an event, for example. I don't want them to log in, and then have to navigate back to the event page; I want them to be redirected right where they were.
So, a fixed url won't work.
Comment #31
jeremycaldwell CreditAttribution: jeremycaldwell commentedSame here. I have a login link on the bottom of my forum topics and when a user clicks the link to login I'd like them to be redirected back to the forum post so they can join the conversation. Any help doing that would be great.
Comment #32
eojthebraveOne option would be to add a ?destination parameter to your login link. So the URL is something like user/login?destination=node/678 where "node/678" is the URL of the page the user is currently on. Then make sure Login Destination is configured to support the ?destination parameter.
Comment #33
Francewhoa@toddwoof: Thanks for clarifying. Indeed setting in comment #29 is for a redirecting user to a specific page. This is not what you want.
The
?destination
parameter is able to do that. But I never tried that with Login Destination (LD). According to LD readme.txt file the LD support?destination
parameter.Comment #34
toddwoof CreditAttribution: toddwoof commented...Which brings us back around to the issue noted in #8, above -- namely, it doesn't work.
@eternalistic: My solution for now is to stick with 6.x-2.1, and to use the solution in #7 on http://drupal.org/node/225890
But of course I'd like to be able to upgrade to the current version, which is why I'm asking what needs to be done for it to work in 6.x-2.5. Evidently something changed; but I can't figure it out.
Comment #35
FrancewhoaChanging status to 'needs work'. Read more at comment #8 http://drupal.org/node/341683#comment-1177305
Any volunteer to provide a patch?
I would be happy to contribute testing.
Comment #36
Sborsody CreditAttribution: Sborsody commentedSubscribe.
I'm trying to achieve the same as what is written in #30.
Comment #37
Sborsody CreditAttribution: Sborsody commentedI followed the LD configuration instructions here and this is working for me now with 6.x-2.5: http://www.interworksinc.com/blogs/scorrales/2009/07/23/taking-control-y...
This seems like the only way to get LD to support the ?destination parameter.
Comment #38
FrancewhoaThanks for the instructions Sborsody.
I have updated the module
README.txt
file. Patch attached below. Any volunteer to test this patch?Patch is against 6.x-2.x-dev 2009-Oct-23
Apply this .patch from the module root directory /sites/all/modules/login_destination
Comment #39
rsvelko CreditAttribution: rsvelko commentedI see that the main use case is "return users to where they were". I maintain the module since not very long.
My first task is to cover this use case with minimum clicks in the UI and then rethink the UI...
PS. We are merging LD into LoginToboggan for 7.x.
This is it for tonight.
Comment #40
rsvelko CreditAttribution: rsvelko commentedThanks for the README patch - it helped with the testing of the module.
I began and am almost finnished with a complete rewrite of the important parts. Everything is there but the code style can be a lot better and there are indeed some logical errors. I fixed the UX errors too. (UX = user experience - mainly in the admin UI of the module)
So stay tuned and let's hope that 2.6 (or 3.0) will be the release that works everytime.
Comment #41
rsvelko CreditAttribution: rsvelko commentedin the 2.6 version it is either / or:
- either the return-user to where they were
- or use-php-snippet / static
see the UI of LD for examples / notes.
Cheers.
I have tested this in 2.6. and all php snippets work.
The only thing that does not is the return-back on the /user page - I provided a tutorial on the project page for this (until I semi-automate it.)