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

Dublin Drupaller’s picture

Assigned: Unassigned » Dublin Drupaller

sounds like it might be a cache issue....can I suggest installing the exclude from cache (cachexclude) module?

dub

Chris97’s picture

Version: 6.x-1.x-dev » 6.x-1.2
Priority: Critical » Normal

I'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:

<?php
   print node_page_default();
?>

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

jippie1948’s picture

The 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

savedario’s picture

I 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:

    foreach ($roles as $role_id => $role_name) {
      if (array_key_exists($role_id, $user->roles)) {
        if ((variable_get('special_notice_text', '') != '') && ($user->access < $check_time)) {

after:

    foreach ($roles as $role_id => $role_name) {
      if (array_key_exists($role_id, $user->roles)) {
	  if ( variable_get('front_'. $role_id .'_text', '') == '' && variable_get('front_'. $role_id .'_redirect', 'drupal') == 'node' ) {
	    continue;
	  }
        if ((variable_get('special_notice_text', '') != '') && ($user->access < $check_time)) {

Hoping this helps someone else...

savedario’s picture

Status: Active » Needs review
CardinalFang’s picture

Thanks. I have the same problem and your code seems to work for me.

manolooo’s picture

That code seems to be doing nothing in my site.

After login redirects me to anon page

savedario’s picture

I trust you defined a front page for at least two roles.

If you have the devel module installed, you could add a line:

dsm( $role_name, variable_get('front_'. $role_id .'_text', '') );

to see where the loop stops.

manolooo’s picture

I 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.

savedario’s picture

No 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.

rsevero’s picture

As 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.

heydemo’s picture

This works for me:

/**
 * Implementation of hook_user().
 */
function yourmodulename_user($op, $edit, &$account) {
  switch($op) {
    case 'login':
      //This fixes a bug in Advanced Front Page and can be removed when issue is resolved.
      //See http://drupal.org/node/782424
      drupal_goto('');
    break;
  }
} 
pbeakley’s picture

subscribing

El Bandito’s picture

Same issue here. Resolved using login destination module. What a shame this module seems abandoned :-(

El B

Dublin Drupaller’s picture

hi el bandito. the module isn't abandoned. updates are coming in dec.

El Bandito’s picture

Great. Look forward to the fixes as this bug seems a bit of a biggy !!!!

Cheers

El B

TE5LA’s picture

Module 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".

mottboy’s picture

Based on comment 11 I can confirm it works on anon and auth. Without it it goes to user page.

As 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".

Simon Georges’s picture

Status: Needs review » Closed (won't fix)

The 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.