При включенном кешировании компонента bitrix:menu отказывается выполняться код result_modifier.php.Вот содержимое:
Текст ошибки:
Fatal error: Class 'CIBlockSection' not found in /bitrix/templates/main/components/bitrix/menu/catalog-menu/result_modifier.php on line 17
Строка 17 - это $dbSection = CIBlockSection::GetByID($matches[0]);
Разве не должен result_modifier.php кешироваться вместе с шаблоном вывода компонента?
Код |
---|
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); global $APPLICATION; $component = $this->__component; if(is_object($component)) { foreach($component->arResult as $key => $arItem) { preg_match("/[0-9]+/", $arItem["LINK"], $matches); //выдергиваем ID из урла секции $dbSection = CIBlockSection::GetByID($matches[0]); //спрашиваем, что за секция у нас if($arSection = $dbSection->GetNext()) { if(intval($arSection["PICTURE"]) > 0) { $dbFile = CFile::GetByID(intval($arSection["PICTURE"]))->GetNext(); $component->arResult[$key]["PICTURE"] = array( "ID" => $dbFile["ID"], "SRC" => CFile::GetPath($dbFile["ID"]), "HEIGHT" => $dbFile["HEIGHT"], "WIDTH" => $dbFile["WIDTH"], "DESCRIPTION" => $dbFile["DESCRIPTION"], ); } } } } |
Fatal error: Class 'CIBlockSection' not found in /bitrix/templates/main/components/bitrix/menu/catalog-menu/result_modifier.php on line 17
Строка 17 - это $dbSection = CIBlockSection::GetByID($matches[0]);
Разве не должен result_modifier.php кешироваться вместе с шаблоном вывода компонента?