Importing products in CSV - URL Key already in use.

Avatar
  • updated
  • Answered
Hi there,

I am coming across an issue which i cant seem to figure away around it.

When you import products into Magento2 via CSV/FTP, Magento creates a unique URL Key for each product which is generated from the products name. However some of my products have the same identical name and so when i try to upload it gives me the 'URL Key is already taken'.

To be honest i thought Magento2 would have simply re-named any duplicate products automatically when imported, but it does not seem to do it....

My question is, is there anyway that i can fix this or get around it?

Important! - Please note that i cannot change the product names and i cannot simply add my own unique 'url keys' into the CSV file when uploading as the files are locked for a reason, So i need to use a different method.
Avatar
anonymous
Quote from Byron Alfredo Saavedra

Hi. I acctually trying with the same problem. What i need, its to see or enable the column url_key of my csv file. Because even when i write a csv with the column url_key header and the url for a product (e. xxxx-xxxx-xxxx) in order to write by my self an unique url; In the upload profile it didn't load my data and i get the error Url key its already in use.

If you know some way to help me with this problem i will thank you.

Hi Byron! Sorry to hear that you're having trouble with this, but in this particular situation I would suggest reaching out directly to the Magento developers. They may already have an established fix for this. 

Avatar
Quote from IMH Support Agent 5
Hello,

Thank you for your question about importing products into Magento. You will need to edit the CSV file by some means to import successfully. If it is locked, and you cannot edit it, then it will keep generating the error you are seeing. A CSV is a basic text file, so you may be able to copy the contents to an unlocked file, edit the problematic URLs, and then try to import again.

Best,
Christopher M.

Hi. I acctually trying with the same problem. What i need, its to see or enable the column url_key of my csv file. Because even when i write a csv with the column url_key header and the url for a product (e. xxxx-xxxx-xxxx) in order to write by my self an unique url; In the upload profile it didn't load my data and i get the error Url key its already in use.

If you know some way to help me with this problem i will thank you.

Avatar
IMH Support Agent 5
Hello,

Thank you for your question about importing products into Magento. You will need to edit the CSV file by some means to import successfully. If it is locked, and you cannot edit it, then it will keep generating the error you are seeing. A CSV is a basic text file, so you may be able to copy the contents to an unlocked file, edit the problematic URLs, and then try to import again.

Best,
Christopher M.