A
A
Aricus2021-11-01 18:58:51
1C-Bitrix
Aricus, 2021-11-01 18:58:51

Why is error 500 issued when calling bitrix:catalog.item?

I am changing the templates of the "Catalogue" component. When called

$APPLICATION->IncludeComponent(
  'bitrix:catalog.item',
  '',
  array(
    'RESULT' => array(
      'ITEM' => $item,
      'BIG_LABEL' => 'N',
      'BIG_DISCOUNT_PERCENT' => 'N',
      'BIG_BUTTONS' => 'N',
      'SCALABLE' => 'N'
    ),
    'PARAMS' => array_merge($generalParams,
      array('SKU_PROPS' => $arResult['SKU_PROPS'][$item['IBLOCK_ID']]))
  ),
  $component,
  array('HIDE_ICONS' => 'Y')
);

an error 500 is issued (if you comment out this call, the page is displayed normally).
Next, I will give examples of the values ​​of variables (calls about 20).
$item
Array
(
[ID] => 8
[IBLOCK_ID] => 1
[NAME] => TE-01
[SHOW_COUNTER] => 2
[SHOW_COUNTER_START_X] => 2021-10-16 03:47:52
[AVAILABLE] => Y
[ CODE] => te-01
[XML_ID] => 8
[ACTIVE] => Y
[DATE_ACTIVE_FROM] =>
[DATE_ACTIVE_TO] =>
[SORT] => 500
[PREVIEW_TEXT] => Remote temperature sensor
[PREVIEW_TEXT_TYPE] => text
[ DETAIL_TEXT] => Digital temperature sensor TE-01 is designed for continuous temperature measurement in various non-aggressive environments.The



sensor is used in conjunction with thermostats, temperature controllers in domestic heating systems.


Sealed case Measuring accuracy ±


0.5°C (in the range from -10°C to +70°C ) 1 [TAGS] => [TIMESTAMP_X] => 10/13/2021 19:11:19 [MODIFIED_BY] => 1 [IBLOCK_SECTION_ID] => 9 [DETAIL_PAGE_URL] => #SITE_DIR#/catalog/#SECTION_CODE_PATH#/#ELEMENT_CODE#. php [DETAIL_PICTURE] => [PREVIEW_PICTURE] => [LANG_DIR] => /module/ [EXTERNAL_ID] => 8 [IBLOCK_TYPE_ID] => catalog [IBLOCK_CODE] => devices [IBLOCK_EXTERNAL_ID] => [LID] => s1



[TYPE] => 1
[BUNDLE] => N
[QUANTITY] => 100
[QUANTITY_TRACE] => Y
[CAN_BUY_ZERO] => N
[MEASURE] => 5
[SUBSCRIBE] => Y
[VAT_ID] => 1
[VAT_INCLUDED ] => N
[WEIGHT] => 100
[WIDTH] => 90
[LENGTH] => 100
[HEIGHT] => 65
[PAYMENT_TYPE] => S
[RECUR_SCHEME_LENGTH] =>
[RECUR_SCHEME_TYPE] => D
[TRIAL_PRICE_ID] =>
)

$generalParams
Array
(
[SHOW_DISCOUNT_PERCENT] => Y
[PRODUCT_DISPLAY_MODE] => Y
[SHOW_MAX_QUANTITY] => N
[RELATIVE_QUANTITY_FACTOR] => 5
[MESS_SHOW_MAX_QUANTITY] => Presence
[MESS_RELATIVE_QUANTITY_MANY] => many
[MESS_RELATIVE_QUANTITY_FEW]_=>
few
[USE_PRODUCT_QUANTITY] => 1
[PRODUCT_QUANTITY_VARIABLE] => quantity
[ADD_TO_BASKET_ACTION] => ADD
[ADD_PROPERTIES_TO_BASKET] => Y
[PRODUCT_PROPS_VARIABLE] => prop
[SHOW_CLOSE_POPUP] => Y
[DISPLAY_COMPARE] =>
[COMPARE_PATH] => /module/catalog /compare/
[COMPARE_NAME] => CATALOG_COMPARE_LIST
[PRODUCT_SUBSCRIPTION] => N
[PRODUCT_BLOCKS_ORDER] => Array
(
[0] => price
[1] => props
[2] => sku
[3] => quantityLimit
[4] => quantity
[ 5] => buttons
)

[LABEL_POSITION_CLASS] => product-item-label-top product-item-label-left
[DISCOUNT_POSITION_CLASS] => product-item-label-bottom product-item-label-right
[SLIDER_INTERVAL] => 5000
[SLIDER_PROGRESS] => N
[~BASKET_URL] => /personal/cart/
[~ADD_URL_TEMPLATE] => /module/catalog/knx/?action=ADD2BASKET&id=#ID#
[~BUY_URL_TEMPLATE] => /module/catalog/knx/?action=BUY&id=#ID#
[~COMPARE_URL_TEMPLATE] => /module/catalog/knx/?action=ADD_TO_COMPARE_LIST&id=#ID#
[~COMPARE_DELETE_URL_TEMPLATE] => /module /catalog/knx/?action=DELETE_FROM_COMPARE_LIST&id=#ID#
[TEMPLATE_THEME] => blue
[USE_ENHANCED_ECOMMERCE] => Y
[DATA_LAYER_NAME] => dataLayer
[BRAND_PROPERTY] =>
[MESS_BTN_BUY] => Buy
[MESS_BTN_DETAIL] => Learn More
[MESS_BTN_COMPARE ] => Compare
[MESS_BTN_SUBSCRIBE] => Subscribe
[MESS_BTN_ADD_TO_BASKET] => Add to cart
[MESS_NOT_AVAILABLE] => Out of stock
)

$arResult['SKU_PROPS'][$item['IBLOCK_ID']]
Array
(
)

$component
CatalogSectionComponent Object
(
[multiIblockMode:Bitrix\Iblock\Component\ElementList:private] =>
[paginationMode:Bitrix\Iblock\Component\ElementList:private] => 1

and so forth, there's a long sheet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2021-11-01
@Tomio

See server error logs (error_log). Detailed messages about the causes of errors are logged there, incl. server (which the 500th is), and there will also be a full traceback where you had an error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question