VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: raimiuxas on May 25, 2022, 21:12:39 PM

Title: Link to category not working when SEO is enabled
Post by: raimiuxas on May 25, 2022, 21:12:39 PM
I have situation:
Category1
     |__Sub category 1
Category2
     |__Sub category 2
I created two diferrent menu with types:
1. Menu item name: AAA. Type: Virtuemart-->Category Layout. Select a Category - empty
2. Menu item name: BBB. Type: Virtuemart-->Category Layout. Select a Category - Category 1, Sub category 1 and etc. (total 4 menu item)
When i disable in virtuemart configuration "SEO Disabled" to YES, url works fine (I can open AAA-->Category1-->Sub category 1) . But when "SEO Disabled" to "No" i can open only "AAA" from menu. I see two category: Category 1 and Category 2 with url to AAA (correct url aaa/category1/subcategory1)
J 4.1.4
VirtueMart 4.0.2 10661

SEO disabled
/aaa/view/category/virtuemart_category_id/23.html

SEO enabled:
/aaa.html
Title: Re: Link to category not working when SEO is enabled
Post by: pinochico on May 26, 2022, 00:35:52 AM
Oh man, Who creating two duplication menu for VM category and next report error????

Sorry, your mistake
Title: Re: Link to category not working when SEO is enabled
Post by: raimiuxas on May 26, 2022, 07:31:37 AM
Ok - for fun i deleted dublicated menu. Now i have only BBB menu. I can select Category 1-->Sub category 1 from menu and i see products. this scenario is working (this scenario worked with two menu)
When i select and click on Category 1 i can't click on Subacategory 1 (see attachment).

Btw: i have website with dublicate menu and it's working. but versions is defferent J3.10.4 and VM 3.6.10. As i remember i had same problem but my solution was like this. J4.x and VM4.x is missing this item (solution for J3x.JPG)
Title: Re: Link to category not working when SEO is enabled
Post by: raimiuxas on May 29, 2022, 07:36:06 AM
This is my solution:
Title: Re: Link to category not working when SEO is enabled
Post by: Milbo on June 20, 2022, 20:22:24 PM
Wow, that is really interesting raimiuxas. And your "doubled" menu items are a normal use case. One time you show just all products and then you have some "shortcuts".
Strict mode makes a difference, interesting. But really disturbing is, that you had to disable the category routing cache, hmmm.
Title: Re: Link to category not working when SEO is enabled
Post by: kovacshazi on July 04, 2022, 17:49:48 PM
When I create a menu item for the category, the URL is broken
Look in the top menu under the menu item "Irányjelzők", it's a virtuemart category
If I select a subcategory here (DOB-040), it already gives me a bad URL:
http://2022.autolampafutar.com/autolampa-webaruhaz/dob-040
It does not have the "iranyjelzok" url part.

If I go to the shop home page (Autólámpa webáruház) then the other categories are fine.
http://2022.autolampafutar.com/autolampa-webaruhaz?clearCart=0
Here for example when selecting the category "Ködlámpák" the subcategories contain the full category tree
http://2022.autolampafutar.com/autolampa-webaruhaz/kodlampak
Going down one more level: http://2022.autolampafutar.com/autolampa-webaruhaz/kodlampak/ft-111-led
This is perfect.

But the "Compasses" category in the top menu is wrong: http://2022.autolampafutar.com/autolampa-webaruhaz

I have tried the previously suggested setting but it does not work for me.
Title: Re: Link to category not working when SEO is enabled
Post by: mawe65 on October 24, 2022, 14:55:46 PM
I ran into the same problem. Does anyone found a solution for this?

Kind regards

Martin
Title: Re: Link to category not working when SEO is enabled
Post by: Milbo on October 24, 2022, 15:28:49 PM
Yes, please try this RC https://dev.virtuemart.net/attachments/1337/com_virtuemart.4.0.7.10722_package_or_extract.zip