Redirect only works when anonymous disabled
| Project: | Front Page |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
I have 7 roles defined for my site.
If I disable only the anonymous role in user permissions, all of the other roles work fine, redirecting to the pages that I set up for them in the Front Page module configuration. When not logged into the site (anonymous role), I get an access denied error as expected.
If I enable the anonymous role in user permissions, all of the other roles redirect to the same page as anonymous. In this case, the anonymous role works fine.
The problem is that I need all of the roles to work.
I've spent hours trying to trouble shoot this, and it appears that the front page module is being activated *before* the login actually completes and again after the login completes. Not sure at this point if that is what is causing the problem.

#1
Same problem here.
#2
Hi,
I've run into the same or similar problem. Here is my setup: I have a "welcome" page for anyone that is not logged in (anonymous users). When a user successfully logs in, I want them to be directed to the "home page". My welcome page has a coda-like slider so I do not see a way to add it to the body text in the "Front Page for anonymous user" under Admin-->Site config-->Advanced Front Page Settings. In the Front Page settings for other roles, I have the "select type" set to redirect, and the "redirect to" set to the node path for my Home Page. Under these conditions, users not logged in see a blank content section (as expected), and upon logging in, are correctly redirected to the Home page. So far, so good.
If I add text to the body area of the "Front Page for anonymous user", it shows up when users log out, as expected. But how do I get my Welcome page to show up? If I set the "set type" for anonymous users to "redirect" and the "redirect to" to the path for the welcome page, then logged out users are directed to the welcome page (this is what I want). But then, when a user logs in, they are directed to the welcome page, not the home page (this is not what I want).
A possible workaround would be to use php in the body area of the "Front Page for anonymous user" to display the node (or content?) of the welcome page. Unfortunately I am a beginner, and do not know anything about php. What code should I use to do this? Is this even a valid approach? Any suggestions? And yes, I've started to learn some basic php : )
Drupal 6.13
Front page 6.x-1.2 (and tried the dev version, too)
#3
I have done some extensive testing with the front page issue that the above users encountered. The problem lies with logging in using the mydomain.com/user page. If you log in at this page you will automatically be taken to the users profile page, no matter what front page has been set to.
However, if you log in using the standard user login block that comes with Drupal, front page will take you to the right front page. This is a minor bug I imagine that can be easily adjusted. For the moment, those sending users to the mydomain.com/user page to login could create a page telling users to log in and use the standard Drupal user log in block on that page.
Edit: To make the above mentioned temporary solution work, you must set the default anonymous page to front_page and then every role have their front page set to front_page. You cannot use redirect at the moment as it will not work.
#4
I had a similar problem. I solved it very easily by setting Static URL and leaving the URL field empty in
Administer/User management/Login Destination/
#5
Schutz that is a great solution. I didn't know the Login Destination module existed so this is a big help. I set the Static URL to front_page and can now leave the user page as the front page for anonymous users. Thanks Schutz.
#6
@jason:
I think that will send the module into a loop. don't do that.
marked as a duplicate