J
J
jorshjorsh952018-10-12 14:39:43
1C-Bitrix
jorshjorsh95, 2018-10-12 14:39:43

Why does the product open on any link?

Good afternoon, there is a link:
site/projects/category/tovar_2
But it will also open by the link:
site/projects/mngjfdnglsnfsgjl/tovar_2 (the main thing is that at the end it should be product_2)
Settings for managing page addresses:
Section page: #SECTION_CODE#/
Detailed view page: #SECTION_CODE#/#ELEMENT_CODE#/
Bitrix news component detail
please tell me how to fix this ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2018-10-12
@ContentProvider

Check in the component settings whether "Strict section checking" is checked

A
Alexander, 2018-10-12
@idruweb

and you can also assign the main category in the infoblock settings

A
Alex-1917, 2018-10-12
@alex-1917

The 404 page is not set up / not created.
You need to create this page, give it the correct titles,

CHTTP::SetStatus("404 Not Found");
@define("ERROR_404","Y");

edit the .htacces
and init.php files in the php_interface folder, something else on the little things
AddEventHandler('main', 'OnEpilog', '_Check404Error', 1);
function _Check404Error() {
  if (((defined('ERROR_404') && ERROR_404 == 'Y') || preg_match('~404~ius', CHTTP::GetLastStatus())) && !defined('ADMIN_SECTION')) {
    global $APPLICATION;
    $APPLICATION->RestartBuffer();
    $APPLICATION->AddChainItem("Ошибка 404");
    include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/header.php';
    include $_SERVER['DOCUMENT_ROOT'] . '/404.php';
    include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/footer.php';
  }
}

in the hermitage, do not forget the checkbox in the properties of the component about 404 errors
if there is not a single familiar word. give it to the pros, you will break the wood yourself ....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question