2

I am trying to upload my stock through the Magento 2 admin panel via CSV.
I am getting the following error:

Category "Default Category/Aftermarket and Parts/Spare Parts/ Fasteners/Screws and Bolts/603-25008" has not been created. URL key for the specified store already exists. in row(s): 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085

I have tried the following SQL queries to remove any potential duplicates:

delete FROM cataloginventory_stock_item 
where product_id not in(SELECT entity_id FROM catalog_product_entity);

But I still cannot upload my complete CSV file.

3 Answers 3

0

I faced the same issue. It was due to category name in the different cases like:

Aftermarket Or aftermarket

URL key for both these categories will be same. So double check category name, it can be same with case sensitive, which Magento does not allow.

1
  • 2
    Thanks I have looked at this and it doesn't seem to solve the problem.
    – Deadulus
    Oct 3, 2017 at 14:12
0

RE: Magento 2.2.5
Well, I am gradually importing 120,000+ stocklines and every day I come across issues.
It turned out somehow I had duplicated some categories and I deleted the extra ones however importing still got an error again on one stockline with 90 categories, a bit OTT and I need to talk with my web data team about that one.

In my EPOS system, I have had to remove commas from various geolocations and edit the categories on Magento to be the same and I finally spotted " Jura Isle de", that I had changed from "Isle de Jura", had a leading space on Magento that I removed thinking all solved, nope.
With a bit more thinking I recalled earlier an issue with the same stockline had a city "Default Category/Browse By Destination/Indian Ocean/Reunion/St. Denis" and at the end was a ton of spaces.
The problem was the import had managed to create "St. Denis " and I had removed the wrong one with no spaces.

I remove the trailing zillion spaces and ran the import, viola, it works.
So leading and trailing spaces can be an issue.

0

This error typically occurs when you try to create a category in Magento with a URL key that already exists in the specified store.

To resolve this issue, you can do the following:

  1. Check the URL key: First, check the URL key you entered for the new category. Make sure that it is unique and does not already exist in the specified store.

  2. Change the URL key: If the URL key is not unique, you can change it to something else that is unique. To do this, open the category for editing and enter a new URL key in the "URL Key" field.

  3. Change the store view: If you need to use the same URL key for different store views, you can change the store view to create the category in a different store view. To do this, select a different store view from the "Store View" dropdown on the category creation page.

  4. Check for duplicate categories: If you are still experiencing the issue after checking the URL key and changing the store view, check if there are any duplicate categories in your Magento store. If there are, delete the duplicate category and try creating the new category again.

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.