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 used the front page module successfully in the past.
To replicate problem:
1) Install front page
2) Configure a front page for unverified user, using the "themed" option.
3) Log in as an unverified user. See the default front page "node", not the specific front page set up for unverified users.
4) Click on a "home" link.... see the special front page set up for unverified user.
Comments
Comment #1
Dublin Drupaller CreditAttribution: Dublin Drupaller commentedsounds like it might be a cache issue....can I suggest installing the exclude from cache (cachexclude) module?
dub
Comment #2
Chris97 CreditAttribution: Chris97 commentedI'm having the same issue. I don't think it's a caching problem. To add some clarification:
In my install, I'd like unauthenticated users to see www.example.com/about when they go to www.example.com. Once they sign in, I don't want them to see about, but rather be shown www.example.com/node immediately. I set up Front Page for anonymous users to redirect to about, and for authenticated users to redirect to node. When an anonymous user shows up, they are in fact shown about, so that's good. However, when they sign in, they remain at www.example.com/about rather than being shown www.example.com/node. (I also tried other pages, such as forum.)
Just like the OP, if you click on any of the home links (which show simply www.example.com in the status bar), you are properly redirected to www.example.com/node if logged in, otherwise www.example.com/about. It's only that first page after logging in that you remain on www.example.com/about. I think there just needs to be some code added to do a redirect to the front page (i.e., www.example.com).
From the readme, I also tried using the PHP code of:
for authenticated users, but the results were the same.
When used for the anonymous configuration, this seems to be an effective workaround, yielding the correct authenticated redirect page:
http://drupal.org/node/624620#comment-2964756
Comment #3
jippie1948 CreditAttribution: jippie1948 commentedThe same kind of problem.
I do not use the URL 'home' for the logged-in user landing page but start/regular which is the URL of a homebox page.
I can solve the problem by installing 'Login destination' module which does the redirecting after login properly. Hence I think the redirecting problem comes from Front Page.
I hoope this observation proves to be useful. :-)
Cheers,
JP
Comment #4
savedario CreditAttribution: savedario commentedI had the same problem as in #2 and I managed to find the issue, for my install, after some code digging.
My setup has 7 different roles, but I only wanted different pages for anonymous and for authenticated users.
As explained in the documentation Front Page tries first the front pages defined for roles with higher id.
The issue I had was that it always stopped at the first role even though I did not define a front page for it, and the loop never got to the front page for authenticated users.
I will learn how to submit a patch, but for now here's the change/hack in the front.module (comments removed to keep it short):
before:
after:
Hoping this helps someone else...
Comment #5
savedario CreditAttribution: savedario commentedComment #6
CardinalFang CreditAttribution: CardinalFang commentedThanks. I have the same problem and your code seems to work for me.
Comment #7
manolooo CreditAttribution: manolooo commentedThat code seems to be doing nothing in my site.
After login redirects me to anon page
Comment #8
savedario CreditAttribution: savedario commentedI trust you defined a front page for at least two roles.
If you have the devel module installed, you could add a line:
to see where the loop stops.
Comment #9
manolooo CreditAttribution: manolooo commentedI have four roles and all of them have a front page defined, not defined in fact but redirected to some node. All of them go to the correct node if I press home but not after loggin in.
At the moment I don't have the devel module.
savedario, thanks for your reply.
Comment #10
savedario CreditAttribution: savedario commentedNo problem.
Did you set the home page of the site to 'front_page' ?
That's the only way I could make it do what happens to you.
Comment #11
rsevero CreditAttribution: rsevero commentedAs jippie1948 mentioned in #3, installing the "Login Destination" module together with the "Front Page" module did the trick for me.
In Login Destination I unset the "Return user to where he/she came from. (Preserve destination)" option and set the static URL for redirection as "front_page".
As far as I could debug "Front Page" doesn't do the trick alone because the destination page for login is defined before the user actually logging in so the redirection home page is always the anonymous one. In fact I beleive the destination page after login is defined when the login form is drawn.
The Login Destination module fixes this.
Comment #12
heydemo CreditAttribution: heydemo commentedThis works for me:
Comment #13
pbeakley CreditAttribution: pbeakley commentedsubscribing
Comment #14
El Bandito CreditAttribution: El Bandito commentedSame issue here. Resolved using login destination module. What a shame this module seems abandoned :-(
El B
Comment #15
Dublin Drupaller CreditAttribution: Dublin Drupaller commentedhi el bandito. the module isn't abandoned. updates are coming in dec.
Comment #16
El Bandito CreditAttribution: El Bandito commentedGreat. Look forward to the fixes as this bug seems a bit of a biggy !!!!
Cheers
El B
Comment #17
TE5LA CreditAttribution: TE5LA commentedModule doesn't work at all for me. When I'm not logged in, all that appears on the home page is "Access Denied: You are not authorized to access this page."
I installed the module.
Enabled it.
Gave permissions to unauthenticated users.
Made an HTML page in the admin area of front_page module.
Cleared the cache.
The redirect is set to "node".
Comment #18
mottboy CreditAttribution: mottboy commentedBased on comment 11 I can confirm it works on anon and auth. Without it it goes to user page.
Comment #19
Simon Georges CreditAttribution: Simon Georges commentedThe 6.x version of "Front page" is not maintained any more. This issue is closed for this reason.
Please upgrade to a supported version of the module and re-open if you still have the issue.