Closed (fixed)
Project:
Redirect 403 to User Login
Version:
7.x-1.5
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2013 at 19:59 UTC
Updated:
17 Sep 2013 at 14:13 UTC
Great Module.
I have a Drupal 7 site that is not in the main directory but housed in a subdirectory. The subdirectory is added to the front of the redirect string which means after a user logs in, they are redirected to an invalid url path. Which means they receive a 404 error.
How do I fix this.
Comments
Comment #1
komlenic commentedThis occurs in the 6.x version also.
Comment #2
chunty commentedI have the same problem in 6. I believe the issue is that the drupal function request_uri() includes the base path. I'm not sure if this is the best way but it could be fixed by replacing the line the function r4032login_redirect() which says:
with the following lines:
I don't use git so I'm not sure how to submit a patch or of this is the "best" way but I'd be interested to hear from the module author either way.
Comment #3
ermannob commentedThanks chunty, you solution works for me.
Comment #4
ermannob commentedWell, that's not a proper solution. It will fail if base_path() returns "/".
A more generic solution would be this:
Comment #5
chunty commentedYer I came undone by my own code just last week and did something similar. I just put my code inside:
Comment #6
garphyI think it's fixed in 1.6. $destination is now handled with drupal_get_destination().