baldwin-agency / magento2-module-url-data-integrity-checker

Magento 2 module which can find potential url related problems in your catalog data
MIT License
262 stars 28 forks source link

Detect url_key's which aren't normalized #14

Open hostep opened 3 years ago

hostep commented 3 years ago

We should add some checks to see if url_key's in the database are normalized or not (contain unexpected characters). If they aren't normalized these can cause bad things.

Apparently there was a bug introduced in Magento 2.3.3 (which has been fixed in 2.4.0) which allowed this problem to happen.

So it would be nice if this tool could detect such problems. The bug only existed for product url_keys, but maybe we should also check the categories, you never know ...

amenk commented 2 years ago

We seem to have that also in url_path of categories ... not sure which bug caused that. Was that already checked?

amenk commented 2 years ago

on the path-check I am also getting

 Category has an incorrect url_path value "freizeitspiele/schwungtuecher". It should be "freizeitspiele/Schwungtücher". Unfortunately this is not easily fixable using the backend of Magento. 

which is kind of wrong ...

amenk commented 2 years ago

According to https://github.com/elgentos/regenerate-catalog-urls#faq url_paths can be deleted, so you can ignore my previous comments.

hostep commented 2 years ago

@amenk: sorry for the delay, I was away in holiday for the past 3 weeks.

I'm quickly tuning in just to mention that only url_path's for products can be deleted, please don't delete them for categories, those are actually being used!

As for your original question, I'll need to dig in a bit, it does sound like a bug at first sight, but I'll need some time in the coming days to get up to speed with all the things I missed during my holiday.

amenk commented 2 years ago

I hope you enjoyed your holiday @hostep - no need to be sorry for the delay :-)

We kind of solved it on staging by regenerating "everything" with the elgentos module and deleting url_path for both, products and categories as well.

In https://github.com/elgentos/regenerate-catalog-urls/issues/48 and the FAQ @peterjaap writes that it's pretty safe to delete url_paths from the categories as well, because the are not kept in sync anymore?

hostep commented 2 years ago

The FAQ only mentions products, not categories 😉 But if you are using a tool to regenerate everything and it also regenerates the url_path's for categories, then you should be fine 🙂

amenk commented 2 years ago

It does mention categories, but might imply that you regenerate anyways https://github.com/elgentos/regenerate-catalog-urls#why-are-my-category-rewrites-for-a-non-default-storeview-in-the-default-storeviews-language

peterjaap commented 2 years ago

@amenk I updated the faq to not imply that ;)