E
E
Elena Fire2021-07-05 23:17:37
1C-Bitrix
Elena Fire, 2021-07-05 23:17:37

CNC processed incorrectly on Bitrix - detailed catalog - what to do?

After working with the filter settings, unfortunately, I don’t know what and what was done, the CNC links ONLY to the detailed catalog stopped working - from all products it leads to a 404 page. In this case, if you set any directory section code (section_path_code or section_id) as the final CNC in the directory settings, the transition to these sections occurs. If you put it in element_code or element_id, it goes to 404. The site is on bare Bitrix, without templates. Here is the code from urlrewrite.php:

<?php
$arUrlRewrite=array (
  0 => 
  array (
    'CONDITION' => '#^\\/?\\/mobileapp/jn\\/(.*)\\/.*#',
    'RULE' => 'componentName=$1',
    'ID' => NULL,
    'PATH' => '/bitrix/services/mobileapp/jn.php',
    'SORT' => 100,
  ),
  1 => 
  array (
    'CONDITION' => '#^/bitrix/services/ymarket/#',
    'RULE' => '',
    'ID' => '',
    'PATH' => '/bitrix/services/ymarket/index.php',
    'SORT' => 100,
  ),
  6 => 
  array (
    'CONDITION' => '#^/personal/orders/#',
    'RULE' => '',
    'ID' => NULL,
    'PATH' => '/personal/orders/index.php',
    'SORT' => 100,
  ),
  8 => 
  array (
    'CONDITION' => '#/personal/bonuses/#',
    'RULE' => '',
    'ID' => 'bitrix:main.pagenavigation',
    'PATH' => '/personal/bonuses/index.php',
    'SORT' => 100,
  ),
  11 => 
  array (
    'CONDITION' => '#^/delivery/#',
    'RULE' => '',
    'ID' => 'bitrix:news',
    'PATH' => '/delivery/index.php',
    'SORT' => 100,
  ),
  3 => 
  array (
    'CONDITION' => '#^/aktsii/#',
    'RULE' => '',
    'ID' => 'bitrix:news',
    'PATH' => '/aktsii/index.php',
    'SORT' => 100,
  ),
  2 => 
  array (
    'CONDITION' => '#^/stati/#',
    'RULE' => '',
    'ID' => 'bitrix:news',
    'PATH' => '/stati/index.php',
    'SORT' => 100,
  ),
  5 => 
  array (
    'CONDITION' => '#^/rest/#',
    'RULE' => '',
    'ID' => NULL,
    'PATH' => '/bitrix/services/rest/index.php',
    'SORT' => 100,
  ),
  10 => 
  array (
    'CONDITION' => '#^/#',
    'RULE' => '',
    'ID' => NULL,
    'PATH' => '/index.php',
    'SORT' => 100,
  ),
);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Elena Fire, 2021-07-16
@BormotunJedy

Decision. Maybe someone will come in handy.
1) create a catalog folder in the site root and index.php in it, in which the bitrix:catalog component is called
2) the following text is manually written in urlrewrite.php:

[номер, которого еще нет в файле] => 
  array (
    'CONDITION' => '#^/catalog/#',
    'RULE' => '',
    'ID' => 'bitrix:catalog',
    'PATH' => '/catalog/index.php',
    'SORT' => 100,
  ),

3) we write the CNC again in all the blocks where they are set, and save the result
4) there is a fork here that looks more like a slingshot: everything will work fine or work with reservations.
How to deal with reservations (the site is a fighting one, you won’t particularly show off with reinstalling Bitrix), a separate issue.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question