1

I truncated core_url_rewrite table then in Index Management section I click on Reindex Data link for Catalog URL Rewrites.

In URL Rewrite Management section I get now 17 records found. See the bellow:

enter image description here

Let's Reindex Data again Catalog URL Management. Without making any changes in products I get more 3 records. See the images bellow:

enter image description here

After Reindexing Data two more times there are now 23 records found. Please note in the image bellow all these 6 records are "Custom" and RP to similarly links like pointers in programming.

enter image description here

Why is this happening? Normally if there are no changes I should get the same records. Why before Reindexing Data Magento doesn't truncate core_url_rewrite table? In this way always the data in here will be fresh? If you have 2000 records with every reindexing of your data you will get more and more records. Is this a bug?

Thank you

2
  • Any custom module installed ? Commented Mar 16, 2016 at 13:58
  • 2
    No extensions. It is Magento default without the sample database. I would like to fix this annoying issue for my production website. So it is just a basic Magento installation without any changes.
    – ADDISON74
    Commented Mar 16, 2016 at 14:01

1 Answer 1

1

This is not exactly a bug, but it's a known issue. You shouldn't have blurred out the request and target paths, so I can tell you exactly what's happening, but I have a pretty good guess.

Essentially, you have 3 products that have identical names. The URL indexer uses the name of the product to create the rewrites, but it's not smart enough to know it had created a rewrite for a given product the first time, and keeps creating new rewrites at every reindex.

You products should have unique names regardless of status and type. Make them unique, truncate the URL table, and try reindexing. It shouldn't give you those extra entries.

4
  • If someone is using only Simple Product it won't be a problem, all products will get a unique name. Things change when working with Configurable Products. Every product should have something different in its name, by the end, to make the difference. The problem here is rewrite process duplicates the records in core_url_rewrites with every Reindexing Data. I will choose to create a php file to truncate initially the table before reindexing. Hope a fix will be available in the next versions, I agree it is a known issue for more than 3 years.
    – ADDISON74
    Commented Mar 16, 2016 at 16:50
  • Your problem will go away if you make ALL of the product names unique, and there is no reason any names should be identical. Please do not create a PHP script to truncate the URL table before re-indexing. If you follow my instructions, you won't have to introduce hacks that could break your site.
    – laketuna
    Commented Mar 16, 2016 at 16:53
  • This is happening because Magento is not checking URLs for being unique like for SKUs. It Magento will do that this issue will not exist anymore.
    – ADDISON74
    Commented Mar 16, 2016 at 19:30
  • @musicliftsme URL Rewrite Management not working after Re-indexed For Category Redirect magento.stackexchange.com/q/210130/57334
    – zus
    Commented Jan 19, 2018 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.