Closed (won't fix)
Project:
Drupal core
Version:
x.y.z
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2005 at 16:56 UTC
Updated:
26 Mar 2006 at 18:07 UTC
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
Comment #1
micha_1977 commentedchecked it in the last 4.6.0 Version, bug is still there
Comment #2
Carlos Miranda Levy commentedThe 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.
Comment #3
micha_1977 commentedthats 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
Comment #4
gollyg commentedThere seems to be a missing ")" at the end of the conditional statement.
Comment #5
morbus iffComment #6
morbus iffComment #7
chx commented$_GET['q'] is unaliased in drupal_init_path hence this is not a problem.