Answer the question
In order to leave comments, you need to log in
How to remove Bitrix error?
I created a second site on the same Bitrix license, everything is set up, everything is ok, but there are problems with the custom search module.
When searching, it gives an error on a new site, and in another it works fine
[Error]
Call to undefined function getElProp() (0)
/home/bitrix/ext_www/site2.ru/local/templates/aspro_max/components/bitrix/search.page/search/result_modifier.php:9
#0: include
/home/bitrix/ext_www/site1.ru/bitrix/modules/main/classes/general/component_template.php:947
#1: CBitrixComponentTemplate->__IncludeMutatorFile(array, array)
/home/bitrix/ext_www/site1.ru/bitrix/modules/main/classes/general/component_template.php:854
#2: CBitrixComponentTemplate->IncludeTemplate(array)
/home/bitrix/ext_www/site1.ru/bitrix/modules/main/classes/general/component.php:766
#3: CBitrixComponent->showComponentTemplate()
/home/bitrix/ext_www/site1.ru/bitrix/components/bitrix/search.page/component.php:396
#4: include(string)
/home/bitrix/ext_www/site1.ru/bitrix/modules/main/classes/general/component.php:605
#5: CBitrixComponent->__includeComponent()
/home/bitrix/ext_www/site1.ru/bitrix/modules/main/classes/general/component.php:682
#6: CBitrixComponent->includeComponent(string, array, boolean, boolean)
/home/bitrix/ext_www/site1.ru/bitrix/modules/main/classes/general/main.php:1068
#7: CAllMain->IncludeComponent(string, string, array, boolean)
/home/bitrix/ext_www/site2.ru/search/index.php:56
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();?>
<?
if($arResult["SEARCH"] )
{
global $arRegion, $arTheme;
foreach($arResult["SEARCH"] as $key => &$arSearch)
{
$arSearch["TITLE_CUSTOM"]=getElProp("TITLE_CUSTOM", $arSearch["ITEM_ID"]);
$arSearch["CML2_ARTICLE"]=getElProp("CML2_ARTICLE", $arSearch["ITEM_ID"]);
$arSearch["TSVET"]=getElPropList("TSVET", $arSearch["ITEM_ID"]);
$arSearch["KOMPLEKTATSIYA_PERVICHNAYA_UPAKOVKA"]=getElProp("TITLE_CUSTOM", $arSearch["ITEM_ID"]);
$arSearch["TRANSPORTNAYA_UPAKOVKA"]=getElPropList("TRANSPORTNAYA_UPAKOVKA", $arSearch["ITEM_ID"]);
if(strpos($arSearch["URL_WO_PARAMS"], "#YEAR#") !== false)
{
if($arSearch["DATE_CHANGE"])
{
if($arDateTime = ParseDateTime($arSearch["DATE_CHANGE"], FORMAT_DATETIME))
{
$url = str_replace("#YEAR#", $arDateTime['YYYY'], $arSearch["URL_WO_PARAMS"]);
if($arResult["NAV_RESULT"]->url_add_params)
$url.= "?".implode("&", $arResult["NAV_RESULT"]->url_add_params);
$arResult["SEARCH"][$key]["URL"] = $url;
}
}
}
if($arSearch['MODULE_ID'] == 'iblock')
{
if(strpos($arSearch['URL'], $arTheme['CATALOG_PAGE_URL']['VALUE']) !== false)
unset($arResult["SEARCH"][$key]);
if($arRegion)
{
$arRegionProps = array();
$rsPropRegion = CIBlockElement::GetProperty($arSearch["PARAM2"], $arSearch["ITEM_ID"], array("sort" => "asc"), Array("CODE"=>"LINK_REGION"));
while($arPropRegion = $rsPropRegion->Fetch())
{
if($arPropRegion['VALUE'])
$arRegionProps[] = $arPropRegion['VALUE'];
}
if($arRegionProps)
{
if(!in_array($arRegion['ID'], $arRegionProps))
{
unset($arResult["SEARCH"][$key]);
}
}
}
}
}
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question