olegkoval / magento2-regenerate_url_rewrites

Magento 2 extension which add feature of regenerating a url rewrites of products/categories
Academic Free License v3.0
428 stars 118 forks source link

Regenerated category URL resulted in double html in url #144

Open Webrela opened 3 years ago

Webrela commented 3 years ago

Regenerated category URL for category range resulted in html appearing in the main category and sub category URL

/patio.html/bbq-covers.html

Expected: /patio/bbq-covers.html

mcpacific commented 3 years ago

I'm experiencing the same thing. Any idea when a fix may be coming?

Luc4G3r commented 3 years ago

Can confirm this issue. Although I found it to happen in one of my live projects, I could not reproduce it in a vanilla installation with sample data installed.

Luc4G3r commented 3 years ago

Hello again. Turns out that Magento 2 has an option to add .html suffix to url rewrites in the backend under Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization. Our live shop, which was migrated from Magento 1.9, had category url keys including an .html suffix which in combination with the default setting of Magento 2 adding the suffix to product and category url rewrites automatically resulted in urls including /category.html/product.html as well as /category.html.html. I'm pretty sure this is not a bug of this package but rather a result of misconfiguration.

xtremevision commented 3 years ago

I have experienced this issue just now. All our categories are without .html suffix, and backend catalog config is set to add the .html suffix. The result is the top level category with one .html suffix, whilst all subcategories have double .html.html suffixes. There's no immediate obvious reason this should be happening. Any ideas? Using Magento 2.4.0.

xtremevision commented 3 years ago

Ok, so I think I know what's going on. I am using Magmi (m2) to import products with categories created on the fly. It looks like Magmi is creating the "url_path" attribute with the .html suffix, so when I run the url regeneration, of course I get double .html.html. Sounds like a bug in Magmi.