VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: mishapod on January 04, 2019, 15:00:07 PM

Title: Redirects to a parent with a non-existent category, but must on 404
Post by: mishapod on January 04, 2019, 15:00:07 PM
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:

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
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
site.ru/category/category-1/1-tovar [/code ]
not processed.
Title: Re: Redirects to a parent with a non-existent category, but must on 404
Post by: jjk on January 05, 2019, 21:28:14 PM
Joomla 2.5 and VirtueMart 2.6 is 5 years old code.
http://virtuemart.net/downloads