Answer the question
In order to leave comments, you need to log in
Why does the Bitrix infoblock element give a 404 error?
details.php:
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Pipe");
?><?$APPLICATION->IncludeComponent(
"site:news.detail",
"",
Array(
"IBLOCK_TYPE" => "services",
"IBLOCK_ID" => 14,
"SORT_FIELD1" => "ACTIVE_FROM",
"SORT_DIRECTION1" => "DESC",
"SORT_FIELD2" => "SORT",
"SORT_DIRECTION2" => "ASC",
"ACTIVE_DATE_FORMAT" => "d.m.Y",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "300",
"CACHE_GROUPS" => "Y",
"SEF_FOLDER" => "/serv/",
"SEF_URL_TEMPLATES" => array(
"element" => "#CODE#/",
),
"TEMPLATE" => "page"
)
);?><?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
Answer the question
In order to leave comments, you need to log in
Try "element" => "#CODE#/", replace with "element" => "#ELEMENT_CODE#/",
If it doesn't help:
as far as I understand, this is a complex component template, so do a var_dump of the arResult arrays before connecting the component and look at the VARIABLES array, under what key will the element code be there
Judging by the file name (detail.php), this component should be called as part of the complex bitrix:news, and the detail.php file itself should be inside the template of this complex component. But I see that the parameters are not inherited from $arParams, but are configured on the component directly. In addition, detail.php contains the header and footer of the template.
Where is this detail.php file located? Are you sure you placed the components correctly? Maybe you need to use this component as part of a complex one? If everything is correct, then most likely you need to check the address processing settings. Otherwise, there are simply no calls to the detail.php script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question