cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.4 some Product URLs show Category path

SOLVED

Magento 2.2.4 some Product URLs show Category path

In my magento 2.2.4 setup some products of some categories show the category path and some do not. i checked all settings but I dont see the difference.

In all store views (Default, etc.) I have setup "NO" for the below setting: Stores/Configuration/Catalog/Catalog/SearchEngineOptimisation/Use Categories Path for Product URLs

 

Someone could help me?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.2.4 some Product URLs show Category path

In our case after a lot of research the problem was the following: Although it indicated to Magento that the urls of the products had to be domain / name-of-the-product.html Magento in some of them built the Urls as domain / category / product-name.html and if the product was in several categories once put a category in the url, again another ... even the breadcrumbs of the product pages showed them wrong.

The problem was that after migrating from Magento 1.9 to 2.2 there were urls of products that were wrong and it did not matter if it was reindexed because there were several 301 that gave error.

What I did was eliminate every 301 erroneous and use a tool to reindex each category and each product and now if it shows them well. I used this one https://github.com/elgentos/regenerate-catalog-urls 

View solution in original post

5 REPLIES 5

Re: Magento 2.2.4 some Product URLs show Category path

We have the same issue, is there a fix for this?

Re: Magento 2.2.4 some Product URLs show Category path

In our case after a lot of research the problem was the following: Although it indicated to Magento that the urls of the products had to be domain / name-of-the-product.html Magento in some of them built the Urls as domain / category / product-name.html and if the product was in several categories once put a category in the url, again another ... even the breadcrumbs of the product pages showed them wrong.

The problem was that after migrating from Magento 1.9 to 2.2 there were urls of products that were wrong and it did not matter if it was reindexed because there were several 301 that gave error.

What I did was eliminate every 301 erroneous and use a tool to reindex each category and each product and now if it shows them well. I used this one https://github.com/elgentos/regenerate-catalog-urls 

Re: Magento 2.2.4 some Product URLs show Category path

And when you run this solution it creates .html.html in category urls. How can that be solved?

Re: Magento 2.2.4 some Product URLs show Category path

In my case it did not generate the urls with .html, they continued being without .html https://www.shopmami.com/ropa-premama/vestidos-premama

Re: Magento 2.2.4 some Product URLs show Category path

THe link you shared of github is shwoing broken can you please help me how can i  reindex product since my product are working fine but search is trying to find url : mydomain/product.html but actual url is : mydomain/category/product.html