Project:Login Destination
Version:6.x-2.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:ToDo

Issue Summary

I have preserve desitnation checked, static url selected, and a URL of 'content'. Condition settings, I have list of paths selected, and a path of 'about'. When I login from the about page I do not get redirected to the content page. If I login from another url (eg node/123) I am on that URL when logged in.

This worked fine on 5.7

Comments

#1

Dear Matt,

Please post all your settings, including page URLs you are logging from as well as their URL aliases. I have a testing environment and will be able to reproduce this scenario.

Thanks.

#2

ARDAS, thanks for looking at this. Please note I have the Front Page and LoginToboggan modules installed.
URL destination settings
- Preserve destination - checked
- Static URL - checked
- URL: content

Redirection Settings
- List of Paths - checked
- Redirect condition - about

URL aliases:
about-> node/1
content-> (page view set up on views 2 module)

On Drupal 5 I had exactly the same settings, using login destination 5.x-1.x-dev, except 'Preserve destination' was not an option.

Is there anything else you need to know?

#3

yeah, something else got "fixed" in the latest version. haven't had a chance to debug it.

#4

Status:active» needs review

so my problem turns out that the return format changed without providing any notice. i've done my share of stupid undocumented backwards compatibilty breaks but it would have been a good idea to do a 2.x beta release so people could test it out.

the down side of the new format is that you can't specify the options to url() to do things like change the language. i changed the return format yet again to return two elements 'path' and 'options' (like url accepts) and did a little clean up on the code to remove some unused bits.

AttachmentSize
login_destination_286877.patch 2.65 KB

#5

Status:needs review» needs work

scratch that last patch... it doesn't work when you return a string. might be best to just return an array in any case. i think until this settles out i'm going to back to the 6.x-1.1 release and apply the patch to fix the menu access.

#6

Dear Matt,

The reason of your problem is that you were using aliases instead of internal paths. Login_destination module doesn't accept aliases. Please use internal paths instead. Change about to node/1 and everything will work fine.

I think that there is no sense in supporting aliases. This will influence performance.

#7

the down side of the new format is that you can't specify the options to url() to do things like change the language. i changed the return format yet again to return two elements 'path' and 'options' (like url accepts) and did a little clean up on the code to remove some unused bits.

Why you can't? I've just checked, you can use this snippet

return array('path' => 'node/1', 'query' => 'x=1', 'fragment' => 'ABC'); to redirect to the URL like this node/1?x=1#ABC

I was unable to redirect to an external site using this statement
return array('path' => 'http://www.google.com', 'external' => true);

I found a problem when multiple languages are configured. The redirection was performed incorrectly - prefix was dublicated.

#8

i don't have time to test it right now but the problem i was running into is that i need to switch the language during redirection so i need to pass $language into url()'s options parameter.

I was unable to redirect to an external site using this statement
return array('path' => 'http://www.google.com', 'external' => true);

shouldn't it be 'absolute' rather than external?

#9

Dear ARDAS

Thankyou, changing to internal paths worked. Using aliases in the drupal 5 version of the module worked fine, how is it that this is not available on drupal 6? This means everyone upgrading from 5 to 6 who used aliases for the redirect condition will need change their configuration - not a major problem for most people, but it does give the appearance of a step backwards... thanks again for your help.

#10

please s.o. check how 2.5 behaves in the light of this issue..

I will see into this myself later

#11

Status:needs work» fixed

the initial issue post's use case works in 2.6. Report here or in a new issue if sth is wrong with 2.6.

marking as fixed cause the discussion above is irrelevant after 2.6 is out.

#12

Version:6.x-2.0» 6.x-2.6
Status:fixed» needs review

I am unable to get this to work with the Views Module. Basically, I want it to link to a page created by Views, which doesn't have a direct path other than the one in Views. Is there any way around this?

#13

Re #12

Same issue here - how you can you redirect to a views page?

#14

Status:needs review» fixed

marking this as fixed. Please reopen if you have to say sth about the initial post's problem.

For views related stuff I opened a new ticket - #715400: how can I redirect to a views page

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here