After migrating products, we noticed that URL rewrites were not working for most products, for example we’re getting stuff like this:
In order to recreate the re-write table, we switched to a temporary root category then back again in Stores -> All Stores
When switching back to the correct root (and thereby regenerating rewrites) we receive the following:
URL key for specified store already exists
So we tried running php -f bin/ubdatamigration fixduplicateurl which found/fixed one dup in catalog_category_entity_varchar and no dups in products. After reindex and cache flush, we are still getting URL key errors when trying to rebuild rewrites.
Some additional info:
- DO NOT have this issue using magento’s built-in data migration tool on the same data. re-writes work and no errors trying to recreate them
- This is a 100% fresh magento install before data migration.
- We also cannot edit URL keys in ANY category — error is “The value specified in the URL Key field would generate a URL that already exists.”
Thanks in advance for any assistance, we are really hoping to be able to use this great module.
Actually, the duplicated URL key issues refer to the conflict between your data with Magento 2 core function.
Our migration tool already verifies the unique category url key, url path; and unqiue product url key, url path. However, this is a special circumstance from your specific data only.
Anyway, glad that you sorted it out at your end.
Please let us know if you run across any other issues, we will work closely with you then.
The issue was due to a product and category having the same URL key.
ubdatamigration does not find this, it only looks for products having the same key as another product and vise versa. Although we finally figured this out manually, I’m just suggesting this script should also look for these duplicates (product and category having same key). For future customers.
We’ve sorry for our late response as we’ve just been back to work from our weekend.
As explained in our previous reply, we find that yours is a specific circumstance. And many users who used our migration tool have not run across the same situation.
Anyway, we have taken note on your report for future reference if other users cope with a similar issue.
This question is now closed