Author Topic: Redirects to a parent with a non-existent category, but must on 404  (Read 310 times)

mishapod

  • Beginner
  • *
  • Posts: 1
  • A beginner
Joomla 2.5
Virtuemart 2.6.

Problem with 404 error. 404 error works, but in VM 2.6 it does not work with products and categories.
Made my 404 error error.php

Code:
Code: [Select]
if (($this->error->getCode()) == '404'){
header("HTTP/1.0 404 Not Found");
echo file_get_contents(JURI::root().'/404');
exit;
}

If a URL is assigned a category + sub-category
Code: [Select]
site.ru/category/category-1
works because it exists.

If you register site.ru/category/category-2 or abra, (Categor not exist), it leads to a parent by reference and the text in the link does not change site.ru/category/abra, (looks like this), but displays what is on the page site.ru/category.

Install processing 404 in the admin does not help. Tried to remove suffixes at the end of the product, nothing.
There was an option that these are redirects, but I went to the VM in SEO and chose the "Use product and category ID" checkbox. Processing categories on 404 is successful, but the product itself is
Code: [Select]
site.ru/category/category-1/1-tovar [/code ]
 not processed.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3470
  • using Matomo instead of Google Analytics
Re: Redirects to a parent with a non-existent category, but must on 404
« Reply #1 on: January 05, 2019, 21:28:14 pm »
Joomla 2.5 and VirtueMart 2.6 is 5 years old code.
http://virtuemart.net/downloads
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations