News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[SOLVED] VM 3.0.14 - invalid routing

Started by n3t, March 16, 2016, 10:16:11 AM

Previous topic - Next topic

n3t

Hi,

after upgrading VM 3.0.12 to 3.0.14 (Joomla 3.4.8) I found routing is not working correctly. It works perfectly to find proper pages, however it fails to detect 404 error.
My config is
- Virtuemart Front page is my home menu item
- means that urls shoud look like www.example.com/category-name, www.example.com/category-name/subcategory-name, www.example.com/category-name/subcategory-name/product-name - this works perfectly
- before upgrade url www.example.com/wrong-category-name results in 404 (in my case causing Joomla redirect plugin to redirect to the page I need)
- after upgrade url www.example.com/wrong-category-name (or www.example.com/whatever/else) results in displaying category page with empty category - All products

This is not expected behavior, is it brings infinite number of duplicate content. If item (or category) is unpublished, it will not work as expected - showing 404 page - but shows list of products.

Pavel

n3t

Note:

"Use product link suffix", "Translate Strings", "Use Product and Category IDs", "Use full category tree for product links" and "Enable VirtueMart 404 error handling" options doesn't have any influence to this behavior.
If "SEO Disabled" option is checked, the result is still wrong (no 404 error), however bit different - it shows Vm frontpage instead of category view.

I checked this behavior also on clean installation, with VM frontapge menu item not set as homepage, and the result is same.

After replacing router.php by the one from VM 3.0.12 it starts to wok correctly (www.example.com/wrong-category-name bresults in 404).

Ghost

Could you please test this. Change:

if($catId!==false){ to: if($catId!=false){ on line 675 of router.php (for VM 3.0.14)

n3t

Hi ghost,

thanks for fast reply, yes this change solved the issue.

Will be this included in official VM?

Milbo

yepp, n3t

Thank you Ghost, for the fast solution
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

n3t


ptrouw

Hi,
It seems this code, if($catId!==false){, is still wrong in 3.0.16.