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] VM3.8.2 Sub-cats are not functioning / problems with nice-url's SEF

Started by ROODvogel, May 29, 2020, 15:50:08 PM

Previous topic - Next topic

ROODvogel

Hi all,

Since update to VM3.8.2 10325, some of my sub-categories don't work any more. When you arrive at the category start page, and click one of the sub-categories, you are referred to the exact same page you are on. Some old categories still work, all newly created categories don't.
If I go to sub-category page via the admin back end, I can reach the page, but the URL is different than the URL that's linked on the category page. For instance:
Link on category page: https://www.roodvogel.nl/index.php/nl/webshop/vlaggetjespost/vlaggetjespost-bedrukking (doesn't work)
Link via admin: https://www.roodvogel.nl/index.php/nl/?option=com_virtuemart&view=category&virtuemart_category_id=9 (works)

Strange thing is that in one of the main categories (vlaggetjespost), 2 sub-categories are working as they should, but the other one is not (that's for the links above). The other main categories have no working sub-categories.

Details of my website:
https://www.roodvogel.nl/index.php/nl/webshop
Joomla! 3.9.18 Stable [ Amani ] 21-April-2020 19:30 GMT
PHP version 7.3.9

Tried changing template to VMBeez3 (can't find how to upgrade to VMBeez5, is that still up to date?)
Tried disabling all plugins (combined with VMBeez3)
Tried creating new categories and sub-categories but they didn't work either. All settings were as standard/no override.

At the moment I'm still on VMBeez3 with disabled plugins to hopefully speed up bug fix. Unfortunately in VMBeez3, I have no menu, breadcrumbs or other navigation other then the links on the homepage or the categories. (on the bottom there is a link to the webshop main page)

Update:
It appears to be related to the creation of 'nice urls'.
If I change this line in components/com_virtuemart/sublayouts/categories.php:70
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id , FALSE);
to
$caturl = '/index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id ;
then, the link actually goes to the intended page with products in the category.
I changed this as a temporary fix and changed by to the original template instead of the vmbeez.
In the resulting html code, I put a comment with the url that should be there according to the default code.

Something that might be related:
I updated the SEF alias of some of the categories after the update to vm3.8.2, and I do see the change in the database. However, the changes were not directly visible in the administrator pages. After a few days they suddenly were?
Still, the working categories don't reflect the changed SEF alias in their url...

Hope you can help me.

Thanks,
Noor (ROODvogel)

ROODvogel

Ok; it took a while, but in the end I managed to find all out myself.
Multiple things were causing pages not load anymore after the upgrade from vm3.6.10 to vm3.8.2, some of which still puzzle me.
1. Some vm sub-categories did not yet had menu-items pointing to them. Apparently, this is now required for the SEF router to find the corresponding page.
Since the menu was still configured to show only up to depth 2, the sub-categories were never visible on the site so that did not give a hint.
Furthermore, I discovered that the SEF alias used in the URL is not that of the vm category config, but the Joomla menu-item config. That is why, I did see the alias change in the db, but not in the URL.
2. The pages with Productdetails were not loading because the vm shop language was apparently set to English en_gb, while the products were only created for Dutch nl_nl. The Joomla default language is nl_nl, so I don't know why vm decided to go for en_gb anyway?