M
M
mirexdoors2018-05-20 00:19:47
1C-Bitrix
mirexdoors, 2018-05-20 00:19:47

Strange behavior of getlist. Where is the mistake?

Hello!
Entangled in three pines. For some reason, the following code outputs each element twice:

$resElements = CIBlockElement::GetList(
              Array("SORT"=>"ASC"), 
            Array("IBLOCK_ID"=>2,"SECTION_ID"=>$arSection["ID"],/*"INCLUDE_SUBSECTIONS" => "Y", "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y" */), 
            false, 
            false, 
            Array("ID", "IBLOCK_ID", "NAME", 'PROPERTY_'.$NAME_PROPERTY_SNAP)
          );
            if($resElements) { ?>
              <ul class="isvapp_iblock_helper__sub-menu">
                <? while($obElements = $resElements->GetNext()) {                             
                                                                  ?>

            <li><div class="isvapp_iblock_helper__menu_title">
                <input type="checkbox" name="ELEMENT_ID[]" class="element-checkbox"  value="<?=$obElements["ID"];?>"<?=$checked;?>>
                <span class="isvapp_iblock_helper__menu_title-text"><?=$obElements["NAME"];?></span>
              </div>
            </li>
            <? } ?>
</ul>
                                               <? } ?>

Thanks to.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Bille, 2018-05-20
@mirexdoors

Possibly due to the fact that a multiple property is involved in the selection ('PROPERTY_'.$NAME_PROPERTY_SNAP)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question