H
H
Hy_ok2018-07-11 13:01:37
1C-Bitrix
Hy_ok, 2018-07-11 13:01:37

Problems with the CRubric class, why doesn't it output anything when calling the CRubric::GetList method?

in general, the essence is that this code displays all our headings, but only in the component file "component.php", and in the .parameters.php file, it does not want to do this, it just outputs emptiness
here is the code:

if(!CModule::IncludeModule("subscribe"))
{
    ShowMessage(GetMessage("IBLOCK_ERROR"));
    return false;
}
$arOrder = Array("SORT"=>"ASC", "NAME"=>"ASC");
$arFilter = Array("ACTIVE"=>"Y", "LID"=>LANG);
$rsRubric = CRubric::GetList($arOrder, $arFilter);
$arRubrics = array();
while($arRubric = $rsRubric->GetNext())
{
    $arResult["RUBRIC_LIST"][] = $arRubric;
}

print_r(123);
print_r($arResult);
die();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kudis, 2018-07-11
@kudis

If your site is not multilingual and you use a standard site, then, with a high degree of probability, instead of the LANG constant, you need to use the identifier 's1'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question