Layered navigation : parent category name in URL

Hi,
After migration i notice that when ANCHOR is set to YES, ULRs of child categories are wrong in layered navigation
I have one sur category called :

Moteurs D (diesels atmosphériques) -- 

with brackets and acute accents.
When i set ANCHOR YES to the parent category (Moteurs), the URL of the category filter for the sub-category mentionned above becomes :

https://mysite.com/moteurs/cat%C3%A9gorie-moteurs-d-(diesels-atmosph%C3%A9riques).html (html copy paste)
https://mysite.com/moteurs/catégorie-moteurs-d-(diesels-atmosphériques).html (html visualy)

When ANCHOR YES, magento takes parent category NAME instead of url key or path to build URL and then link doesn’t work
Why does the template takes category name and why does he add the word “catégorie” (in French) before the name.
When i set ANCHOR NO, design of category filter is broken (brackets arround qty disappear and lines become narrow)
Same issue on all categories on my custom template and on Luma
Thanks for your help

8 answers

Profile photo of Mall Staff 184060.00 $tone October 9, 2018
Public

Hi there,
It relates to the Magento core function on your data settings only, which does not relate to our migration tool.
Please help to check further at your end. 
Regards,
Mall.

#1
Profile photo of Mall Staff 184060.00 $tone October 10, 2018
Public

Hi there,

When ANCHOR YES, magento takes parent category NAME instead of url key or path to build URL and then link doesn’t work

That is strange. If you set Anchor = Yes, Magento will generate URL rewrite for that category and all assigned products. And if you set Anchor = ‘No’, Magento delete all URL rewrite of assigned products and regenerate URL rewrite for that category only (if it has changed URL Key value). This is the working rule of M2 core.
And in all cases, Magento uses the URL Key value of category to generate rewrite URL of that category or associated products. The url path value of categories using for URL rewrite of associated products when you enable this setting only: http://i.prntscr.com/VYFfB5U4TFOoirv0JeNyAg.png
Hope that helps.
Regards,
Mall.

#3
Profile photo of automaati 180.00 $tone October 12, 2018
Public

Thanks for your answer.
Enabling/disabling this setting didn’t fix my issue.
The most weird is that M2 takes the word “catégory”, translates it in french (look ! the URL contains “catégorie” !) and after that add the category name to build URL.
I’ve check database if i could this all those bad URL … they are correct 🙁
And the most bothersome is that i didn’t touch any core file.
I keep investigating.
Regards

#4
Profile photo of ubdev Staff 98150.00 $tone October 15, 2018
Public

Hi there, 
We’re sorry for our late reply as we’ve just been back to work from weekend. 
As explained in previous reply of our team member Mall, the situation associates with Magento core functionality. 
Meanwhile, we run across this thread on the issue with parent category url_key in URL, please take a look to see if you can find any reference. 
Regards,
Ubertheme team

#5
Profile photo of automaati 180.00 $tone October 15, 2018
Public

Hi there,
thank you for the link. i’ll investigate this side but at first sight, it looks concerning a product URL issue.
My problem seems to be specific to categories.
I’ll tell you if i find something.
Regards

#6

This question is now closed

Written By

Comments