Index: branches/RC/core/units/general/helpers/themes_helper.php =================================================================== diff -u -N -r11682 -r11830 --- branches/RC/core/units/general/helpers/themes_helper.php (.../themes_helper.php) (revision 11682) +++ branches/RC/core/units/general/helpers/themes_helper.php (.../themes_helper.php) (revision 11830) @@ -345,7 +345,13 @@ } // use current theme, because it's available on Front-End - return $this->Application->GetVar('m_theme'); + $theme_id = $this->Application->GetVar('m_theme'); + if (!$theme_id) { + // happens in mod-rewrite mode, then requested template is not found + $theme_id = $this->Application->GetDefaultThemeId(); + } + + return $theme_id; } /**