Index: branches/5.1.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r13811 -r13921 --- branches/5.1.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 13811) +++ branches/5.1.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 13921) @@ -1,6 +1,6 @@ _getDefaultDesign(); + $not_found = $this->Application->ConfigValue('ErrorTemplate'); + $real_t = $not_found ? $not_found : 'error_notfound'; + + $themes_helper =& $this->Application->recallObject('ThemesHelper'); + /* @var $themes_helper kThemesHelper */ + + $theme_id = $this->Application->GetVar('m_theme'); + $category_id = $themes_helper->getPageByTemplate($real_t, $theme_id); + $this->Application->SetVar('m_cat_id', $category_id); + + header('HTTP/1.0 404 Not Found'); } // replace alias in form #alias_name# to actual template used in this theme