This article provides a patch for the known Magento 2.2.3 issue related to getting errors when trying to import a
.csv file with products information, if there are products with same name.
.csv file with products information is imported, and there are products with same name, you get the the following error on the Check Data step: "URL Key XYZ was already generated for an item with the SKU %sku%" . The issued is cause by rewriting the products URL's during import, even there's no column for products' URLs in the imported
Steps to reproduce:
- Create two configurable products with the same name in Magento Admin.
- Create a
.csvfile to import data for those products, which has for example these columns:
- Go to System > Data Transfer > Import and select the
- Click Check Data.
No issues found, you can import the
.csv file successfully.
The following error message is displayed: "URL Key XYZ was already generated for an item with the SKU %sku%", it is not possible to import the file.
The patch is attached to this article. To download it, scroll down to the end of the article and click the file name, or click the following link:
Compatible Magento versions:
The patch was created for:
- Magento Commerce 2.2.3
The patch is also compatible (but might not solve the issue) with the following Magento editions and versions:
- Magento Commerce, Magento Commerce Cloud
- 2.2.X, 2.3.0
How to apply the patch
We strongly recommend applying and testing the patch on the Integration/Staging environment, before applying it Production. We also recommend to have a recent backup before any manipulations.
How to apply this patch for Magento Commerce Cloud
(replace the patch name with a particular one)
- If you do not have a directory named
m2-hotfixesin the project root, please create one.
- Copy the
MDVA-12899_EE_2.2.3_COMPOSER_v2.patchfile(s) to the
Add, commit, and push your code changes:
git add -A && git commit -m "Apply MDVA-12899_EE_2.2.3_COMPOSER_v2 patch" && git push origin
How to apply this patch for Magento Commerce
- Upload the patch to your Magento root directory.
- Run the following SSH command:
(If the above command does not work, try using
patch -p1 < MDVA-12899_EE_2.2.3_COMPOSER_v2.patch
- For the changes to be reflected, refresh the cache in the Admin under System > Cache Management.