Index: branches/RC/core/units/general/cat_event_handler.php =================================================================== diff -u -r10780 -r10786 --- branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 10780) +++ branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 10786) @@ -2331,6 +2331,21 @@ { $object =& $event->getObject(); if (!$object->isLoaded()) { + if (!$this->Application->IsAdmin() && ($object->Prefix != 'cms')) { + // category item not loaded on Front-End -> it's not found in database + header('HTTP/1.0 404 Not Found'); + + while (ob_get_level()) { + ob_end_clean(); + } + + // object is used inside template parsing, so break out any parsing and return error document + $error_template = $this->Application->ConfigValue('ErrorTemplate'); + $this->Application->HTML = $this->Application->ParseBlock( Array ('name' => $error_template) ); + $this->Application->Done(); + exit; + } + return true; }