I
I
Ilya17912016-11-21 13:36:10
CMS
Ilya1791, 2016-11-21 13:36:10

Why does it give a 404 error on a certain category of pages when you turn on SEF Advanced Mode?

Good afternoon!
Created a new category of pages "Our services" on the site. I use the module to display a list of links to pages with services on the main page. The category had links with id at the beginning. Removed them by putting code in the config.xml file

<field name="sef_advanced_link" type="radio" default="1" label="SefAdvancedMode" description="Remove Item ID from Content URL?">
      <option value="0">JNO</option>
      <option value="1">JYES</option>
    </field>

and setting the option Yes through the admin panel.
Ids from links disappeared, but pages in this category began to give 404 errors. I found a tip to change the if ($count == 1) { line to if ($count == 1 && !$advanced) {
in the router.php file, but that didn't work. In the settings of categories and modules, I do not find any differences from others. However, the error is only in this category. What could be the reason?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Goryachev, 2016-11-21
@webirus

There is another hack, it is for 3.1, but maybe it was formed somewhere else.

в файле components/com_content/router.php
на примерно 377 строке:
код
->where($db->qu oteName('alias' ). ' = ' . $db->quote($db- >quote($seg ment)));
надо заменить на
->where($db->qu oteName('alias' ). ' = ' . $db->quote($seg ment) );

Well, quite a banal decision.
Check if the .htaccess file is valid and not the default htaccess.txt

I
Ilya1791, 2016-11-21
@Ilya1791

The line there is already the last option. htaccess is correct too. What is the reason, I have no idea.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question