Index: branches/RC/core/units/categories/categories_event_handler.php =================================================================== diff -u -r11821 -r11866 --- branches/RC/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 11821) +++ branches/RC/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 11866) @@ -251,7 +251,6 @@ $module_name = $event->getEventParam('module') ? $event->getEventParam('module') : 'In-Commerce'; $parent_cat_id = $this->Application->findModule('Name', $module_name, 'RootCat'); } - } else { $parent_cat_id = $this->Application->GetVar('c_id'); @@ -263,6 +262,11 @@ } } + if ("$parent_cat_id" == '0') { + // replace "0" category with "Content" category id (this way template + $parent_cat_id = $this->Application->findModule('Name', 'Core', 'RootCat'); + } + if ("$parent_cat_id" != 'any') { if ($event->getEventParam('recursive')) { if ($parent_cat_id > 0) { @@ -495,7 +499,7 @@ $template = $this->Application->GetVar('t'); } - // bug: when template contains "-" symbols (or others, that stripDisallowed will remplace) it's not found + // bug: when template contains "-" symbols (or others, that stripDisallowed will replace) it's not found if (!array_key_exists($template, $page_by_template)) { $sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . ' FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '