News:

Support the VirtueMart project and become a member

Main Menu

URL routing error with VM category

Started by claesbas, November 24, 2016, 14:32:09 PM

Previous topic - Next topic

claesbas

I have a problem here with URLs and 404-error here:

https://www.nintendo.se/ <- Normal Joomla article as "home" menu

https://www.nintendo.se/this-page-does-not-exist <- Gives correct 404 page

(Updated links below because it says possible spam and then URLs are not working)

https://www.nintendo.se/amiibo <- VM category

https://www.nintendo.se/amiibo/this-page-does-not-exist <- Gives no 404 error

https://www.nintendo.se/amiibo/seems-I-can-add-whatever-after-a-VM-category <- I can add whatever after a VM category menu like in this case /possible spam/.......

But if its a valid Joomla (or other component) menu item like https://www.nintendo.se/nyheter/ - Nyheter is Joomla single article menu. Everything after this https://www.nintendo.se/nyheter/xxxxxxxxxxxxxxxxxxxxxxxx does not work and gives correct 404-error.

Something is not 100% correct in VM URL routing - This thread seems to address the same: http://forum.virtuemart.net/index.php?topic=130871.15
VMuikit - A Virtuemart theme for Yootheme template
https://joomlapro.com/vmuikit

VMonepage - One Page Checkout (Was free - now is €20)
https://joomlapro.com/product/virtuemart-one-page-checkout

VMKCO - Klarna Checkout Enhanced
https://joomlapro.com/product/virtuemart-klarna-checkout

claesbas

Ok I cannot write /poke mon/ without that space in the URL above.


https://www.nintendo.se/system/new-nintendo-3ds/ <- This is a VM category

I can add whatever after https://www.nintendo.se/system/new-nintendo-3ds/asdfasdfasdfasdfdsafasadfasdfdsafsdfasfsdfd <- Still gives no 404 error

VMuikit - A Virtuemart theme for Yootheme template
https://joomlapro.com/vmuikit

VMonepage - One Page Checkout (Was free - now is €20)
https://joomlapro.com/product/virtuemart-one-page-checkout

VMKCO - Klarna Checkout Enhanced
https://joomlapro.com/product/virtuemart-klarna-checkout

Studio 42

It's perhaps becuase you not use suffix in the urls for products in Vm config > SEF ?

sandstorm

J3.6.4 / PHP7.0.12
VM3.0.16

claesbas

Tested now here with both "Use product link suffix" on checked and unchecked (cleared joomla and browser cache) still same behavior.
VMuikit - A Virtuemart theme for Yootheme template
https://joomlapro.com/vmuikit

VMonepage - One Page Checkout (Was free - now is €20)
https://joomlapro.com/product/virtuemart-one-page-checkout

VMKCO - Klarna Checkout Enhanced
https://joomlapro.com/product/virtuemart-klarna-checkout

claesbas

Quote from: sandstorm on November 24, 2016, 14:51:09 PM
Patrick, maybe same issue as you helped me with a while ago here - http://forum.virtuemart.net/index.php?topic=130871.msg451296#msg451296

If I do this change I do get redirected to a URL https://www.nintendo.se/amiibo?error=404 like this which is for me a little bit better. However nothing is saved in Joomlas "Redirect" function (which would be nice - I use this to collect old and bad URLs for redirection).

For me the best behavior would be to come to Joomlas 404 error page like one does here: https://www.nintendo.se/this-page-does-not-exist - I would like the same thing to happen here: https://www.nintendo.se/amiibo/this-page-does-not-exist

Studio 42 - would that be possible?
VMuikit - A Virtuemart theme for Yootheme template
https://joomlapro.com/vmuikit

VMonepage - One Page Checkout (Was free - now is €20)
https://joomlapro.com/product/virtuemart-one-page-checkout

VMKCO - Klarna Checkout Enhanced
https://joomlapro.com/product/virtuemart-klarna-checkout

Studio 42

I think that perhaps changing a little the router, it's possible to check validity and directly redirect to standard Joomla 404, if the page is not valid.

Milbo

You can also just disable the vm404 handling, by config
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

I think this is only needed for 404 redirect.
JError::raiseError(404, JText::_('CATEGORY_NOT_FOUND'));
I checked on the com content router, they use this, so it should give same result, so check the code in the link and remove the old patch and use this so you have the same behavior as Joomla articles.
Note that if you add it for missing products or other, should work too, but this need some test.

sandstorm

Quote from: Milbo on November 24, 2016, 17:06:33 PM
You can also just disable the vm404 handling, by config
This was tested with VM404 handling switched off.
J3.6.4 / PHP7.0.12
VM3.0.16