magento2-regenerate_url_rewrites icon indicating copy to clipboard operation
magento2-regenerate_url_rewrites copied to clipboard

Regenerated category URL resulted in double html in url

Open Webrela opened this issue 4 years ago • 5 comments

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

Webrela avatar Jan 22 '21 10:01 Webrela

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

mcpacific avatar Feb 15 '21 21:02 mcpacific

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 avatar Mar 19 '21 13:03 Luc4G3r

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.

Luc4G3r avatar Mar 22 '21 15:03 Luc4G3r

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 avatar Jul 13 '21 13:07 xtremevision

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.

xtremevision avatar Jul 13 '21 15:07 xtremevision