Site-Settings
default homepage -> "node"

path alias
node -> "home"

bug
when "home" is called, $is_front is not set but should be,
because node = home(path-alias)

see line 80 in phptemplate.engine

  if (drupal_get_path_alias($_GET['q']) == variable_get('site_frontpage', 'node')) {
    $vars['is_front'] = true;
  }

i think it should be

  if (drupal_get_path_alias($_GET['q']) == variable_get('site_frontpage', drupal_get_path_alias('node')) {
    $vars['is_front'] = true;
  }

Comments

micha_1977’s picture

Priority: Normal » Critical

checked it in the last 4.6.0 Version, bug is still there

Carlos Miranda Levy’s picture

The fix above works fine.

Just wanted to comment that if you have more than one alias for that front_page page (say 'home' and 'welcome') and use any alias but the first one created, the is_front variable (even with the fix) won't work.

It just happened to me yesterday on a site where I had created the alias 'welcome' for the front_page generated splash page a few weeks ago, but forgot about it and created a new alias 'home' for it and it took me a while to discover why is_front was not working.

Cheers.

micha_1977’s picture

thats funny, i never tried to set an alias for an alias (and so on)

seems to me the system should forbid to set an alias or at least gives a warning

gollyg’s picture

There seems to be a missing ")" at the end of the conditional statement.

morbus iff’s picture

Project: PHPTemplate » Drupal core
Version: 4.6.x-1.x-dev » 4.6.3
Component: Template Defaults » theme system
Priority: Critical » Normal
morbus iff’s picture

Version: 4.6.3 » x.y.z
chx’s picture

Status: Active » Closed (won't fix)

$_GET['q'] is unaliased in drupal_init_path hence this is not a problem.