I believe would be nice to have the list or references/errors about the wrong records during the import. I have been trying to import a file containing 7100 products into M2 since two weeks now- too many failures. The message we get is too poor of information and cannot figure out what's the involved / wrong record into the CSV.
Proposal (maybe not all of the below but some of them would be nice to have) :
Anyway, I can assure I haven't included any duplicated entries therefore the 'URL key already exists' message is not pertinent to the error itself or something goes wrong during the import.
For you info : I have also tried to use the product API but due to the current draft-documentation I wasn't able to succeed. there another example .. a message like "The product %1 cannot be associated to the category %2' or something similar , whilst adding the same record by using the UI linking to the same category i have specified in the API call .. just works!
Let me know if you need addtional info from my side.
Many thanks for your support!
Hi @naspar
We already have this item in the backlog as our next improvement for import/export functionality (MAGETWO-40044) Thanks!
/regards
hi @asemenenko, is this issue resolved? I also got it when importing product csv though my data is not duplicated.
Hello,
i run 1.0.0-beta magento 2 and i'm strugeling with the importer.
i fixed all the issues with check data, but after import i get this some messages "URL key for specified store already exists". i started with sample data and i tried also with clean install but it doesn't matter. Can someone help me with it?
the debug log give no errors and the system log gives only a critical
thanks
Need to join in. Importing 4000 products and verified everyone has an unique url key. i can see in the database the importer does 100 product steps, 500 are getting imported, then the whole import procedure stops telling me "URL key for specified store already exists". Which is defenitely wrong. i tried the same with only 700 products, 1 of 30 imports succeeded. However, when removing the products and trying to reimport using the same file which has succeeded, i get the "URL key for specified store already exists" error again. There seems to be a bug in the import mechanism.
Having the same issue as IceReaper,
Is There a Fix for this?
I've encountered this same issue and determined that, in my particular case, it was due to the category URL keys not being removed properly from the url_rewrite
table after removing them from the store. That said, it might also be caused as part of the update action on import. Haven't really dug too deep into it. Just wanted to share my findings.
Manually deleting any category rows that are no longer used in the url_rewrite
table resolved this for me.
Is this problem solved? I am still getting same error. Looks like Magento 2 import is very buggy at the moment. I am using magento 2 on digital ocean setup.
Same problem here.
Same problem. It is working fine with 1 and 2 lines in my CSV
Found the issue (Or at least a possible cause).
Let's say you have two products, one with the ID ABC/123/456, and the other ABC/123-456.
Now let's also assume you're using the product ID for the URL, so the two above appended with '.html' or whatnot.
When they get inserted into the database, all instances of '/' are converted to '-'.
Meaning they both come out as ABC-123-456.html, and since you can't have duplicate URLs, whichever gets inserted second (or third, or fourth, depending on exactly how many matches you have in that batch) gets denied.
This was the issue in our case at least, hope it helps!
I'm having this issue and I have only uploaded 2 of my products, so there is no way there are URLs for this store yet. All of my url keys and SKUs are unique and the CSV does not have any errors.
Here's one solution to this problem:
Make sure the total length of your categories
CSV column is shorter than 255 characters. You can check your url_key
length too, but I haven't run into issues with my data set on that one.
For the Magento Devs, here is a CSV file you can use to recreate the error: magento-import-errors.txt
I had also this problem, what I did, I have kept blank URL key column, and make sure you have add correct category name with upper and lower case letter.
In my case the issue happens when there are more than 1 categories in the category column. Example:
Default Category/Men - Successful import.
Default Category/Men, Default Category/Woman - Error.
Is this the right way to import to multiple categories?
Yes, you can use this format to use multiple category import for ex: Default Category/Gear|Default Category/Gear/Fitness Equipment.
I hope this works
Hello,
we encountered the same problem when two products in the import file had the same name.
The url creating mechanism should add an increasing number to each duplicate rewrite. Or better offer an option for the user to choose whether to handle rewrites automatically or show errors when doing the import.
I am truly surprised about this issue which is still there ... I believe it is a big blocker for anyone willing to migrate mid-sized ecommerce platform to m2
On 17 Mar 2016, at 11:56, PingusPepan [email protected] wrote:
Hello,
we encountered the same problem when two products in the import file had the same name.
The url creating mechanism should add an increasing number to each duplicate rewrite. Or better offer an option for the user to choose whether to handle rewrites automatically or show errors when doing the import.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
@Hiral12 Multiple categories actually need to be separated by _commas_ not the pipe character. I too was confused by this, as the product attributes use the pipe character.
Here is the proper way to format multiple categories in the CSV file:
"Default Category/Gear,Default Category/Gear/Fitness Equipment"
Issue still exists, got an import with ~3000 products that passes the check data test but crashes during the import. There are definitely no duplicate URL keys and the same error even happens when removing the URL key column from the import.
@nobuttsalex Have you tried to import the products setting ONLY ONE category? Setting only one category in the CSV file solved the issue for me.
This is a big issue for me. The Import feature is completely bugged, with no way of being able to find whats causing the issue. Also the features are very lack lustre as I can't just have my products with individual SKUs, they must have individual names as well. This would be very annoying for someone who selling 3 different pairs of Black Nike Mens Slippers but has no way to describe them furter.
@chriseverson might be on to something. On checking the url_rewrite table, theres was metadata on the cell it was hanging on. It appears to be sharing certain data and containing what looks to be a subcategory in its name as well.
@lgarridoj Thanks I will give that a go next time. I ended up splitting the import into loads of smaller files and importing them one at a time, took ages but got there in the end.
Okay I can now confirm and prevent issue.
To prevent this issue from happening, create all your categories manually.
Then delete any category data that appear on your url_rewrite table, and any product sharing the same ids.
When importing, make sure you use an appropriate separator. If your categories use a comma, use an asterisks!
After doing this, you should be able to import your data!
After clearing all the category rows on the url_rewrite table. I was successfully able to import my csv of 1000.
Couple issues I ran into:
Certain documentation/tutorials specify to separate categories with |
which doesn't work. They should be separated by commas as mentioned by @jaywilliams
I also set the url_key to the sky number as well so that it will always be unique.
Also make sure everything is UTF8 encoded.
I too am running into this issue, in my case it's to do with configurable products. Each of the sizes (simple products) has the same product name as the parent (configurable) product, but module-url-rewrite doesn't increment a counter on the URL key to ensure they are unique. Is there an easy way to fix this without changing my data? Perhaps manually setting the URL key using a function, unknown to me, which will give me the next unique URL available for a given string?
I was getting this error because of trailing white spaces and different cases on category names. Once these were resolved, the file imported without error.
This issue occures when the ctaegories path does not match actual categoriy names in Magento. Category path is case sensitive.
Any one got any solution for this, i am facing this issue in 2.0.4
I keep getting this error on the first item I try to import, I checked my url_rewrite table and its basically empty.
Same here, updated to Magento 2.0.7 but the problem still exist. In my case I have no category or url_rewrite specified.
When products have a duplicate name the import will fail (Error: Specified url key is already exist in rows).
I have the same problem running on the latest Magento. I removed all url_rewrite entries of the the type category - did not help in my case. The URL is built using the SKU which is by definition unique in my table. So I'm pretty sure there are no existing entries with the same value.
I have the same problem 'URL key for specified store already exists.'. My problem is not related to the categories but a duplication of my product:
During the validation of the multi-store catalog import, the product is in two different bunch into importexport_importdata
table. My "main" line product is a bunch and my declination for the "my_store" is in a second bunch.
And during import, it creates the product two times for the same sku.
I think the problem is because the sku is not preserved between two bunch. So the product - in the second bunch - also goes into creation instead of an update.
cf https://github.com/magento/magento2/blob/2.0.6/app/code/Magento/CatalogImportExport/Model/Import/Product.php#L1439
The variable $entityRowsIn
is reset each loop and my product sku isn't into $this->_oldSku
See https://github.com/magento/magento2/issues/4430 for a potential hack to work around the issue. I suspect the urls are generated in the same way for product updates as for category updates. De-duping the list will work around the issue.
I have discovered another cause of this issue. If you are importing items which share a same-named subcategory (i.e. Mens/Shirts and Womens/Shirts ) those subcategories, in this case "Shirts" must already exist. If they don't exist, when the file is imported, Magento creates them but tries to give both of them the url_key "shirts." This causes the url key error.
Manually creating these categories and giving them unique url_key's fixed the problem for me.
I found a work-around.. not the easiest but it is faster than spending so much time researching.
I uploaded my spreadsheet of products leaving the categories column blank, then I created another spreadsheet with just the "sku" and "categories" columns, and individually uploaded the categories. This upload would fail if I tried adding more than one category separated with a comma, so for my products that had more than one category, I had to create yet another spreadsheet with just the "sku" and "categories" columns with the 2nd category.
Hope this helps someone!
I got this solved by running the below query to the database:
delete from catalog_product_entity_varchar where attribute_id=98 and value="";
where 98 is the attribute_id of url_path attribute.
Hope this helps someone!
I was having the same issue. For me, it turns out that some of the categories I was importing into had commas in their names.
Magento's import module was reading these as separate values. All I had to do was change the Multiple value separator value of the import configuration to something other than a comma. I decided to use the pipe character "|"
Worked like a charm :)
I had this issue and resolve it. It looks like symbols "--" trimmed to "-".
I replace all "--" with "-", remove duplicate url_key
and it work.
I'd recently changed an attribute set name from "Digital Camera Batteries" to "Digital Camera and Camcorder Batteries".
When I first tried to import my new file I'd used the old "Digital Camera Batteries" attribute set name and I got the error that the attribute set didn't exist.
I then changed my import file to "Digital Camera and Camcorder Batteries" and tried the import again. That's when I got the 'URL key for specified store already exists.' error.
I changed the attribute set name back to "Digital Camera Batteries" in Magento and in my import file and tried again. It worked!
Clearly the Magento 2 import engine is throwing error messages that are in no way related to the actual error.
In this case, I can see two bugs:
1) I can set attribute set name to "Digital Camera and Camcorder Batteries" in Magento but when I import to that set I get an error.
2) Magento 2 throwing "URL key for specified store already exists" errors when that is not the reason for the error.
I'm pretty disappointed given how much Magento touted the improved import functionality at Magento live.
In my case I had an attribute set where the product's url attribute (url_path or url_key I believe it's called) was missing. In that case every product's full url becomes category/category/.html. It might be worthwhile to create a clear exception in this case.
Previously, changing the Multiple Value Separator worked for me. However with a subsequent file import, I received the error again.
After digging .. and digging .. and digging .. _ad infinitum_
I discovered that the product import was breaking in the _createCategory()_ method of the class:
Magento\CatalogImportExport\Model\Import\Product\CategoryProcessor
What ended up happening is the existing category name had a space character (" ") at the end of its name, so Magento wasn't finding an existing category and was creating a new one.
I added logic to the function to account for whitespace in Category names and return the ID of an already existing category.
protected function createCategory($name, $parentId)
{
/** @var \Magento\Catalog\Model\Category $category */
if (!($parentCategory = $this->getCategoryById($parentId))) {
$parentCategory = $this->categoryFactory->create()->load($parentId);
}
// Check For Existing Category
$subCategories = $parentCategory->getChildrenCategories();
foreach($subCategories as $cat){
if(trim($cat->getName()) == trim($name)){
$this->categoriesCache[$cat->getId()] = $cat;
return $cat->getId();
}
}
// Create New Category
$category = $this->categoryFactory->create();
$category->setPath($parentCategory->getPath());
$category->setParentId($parentId);
$category->setName($name);
$category->setIsActive(true);
$category->setIncludeInMenu(true);
$category->setAttributeSetId($category->getDefaultAttributeSetId());
$category->save();
$this->categoriesCache[$category->getId()] = $category;
return $category->getId();
}
Sadly, this isn't the only error that is stopping this product import..
Now when importing my file, I am seeing:
General system exception happened
Additional data: Notice: Undefined offset: 1563 in /var/www/html/vendor/magento/module-catalog-import-export/Model/Import/Product.php on line 1695
Note that 1563 is referring to the _Product SKU_ & my line 1695 may not be the same as others because I have some logging happening to help me debug. The error is happening in the _getProductCategories()_ method.
1693 | public function getProductCategories($productSku)
1694 | {
1695 | return array_keys($this->categoriesCache[$productSku]);
1696 | }
For this, what ended up happening is my "Allowed Error Count" was set to 10, and every row was throwing the error:
Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in rows: ...
Consequently, only the first 10 rows were being processed (all others skipped):
if ($this->getErrorAggregator()->hasToBeTerminated()) {
$this->getErrorAggregator()->addRowToSkip($rowNum);
continue;
}
Apparently there is no logic to take the skipped rows into consideration when the "catalog_product_import_bunch_save_after" event is dispatched and the _execute()_ method from the following class is called:
Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver
All I did was raise my error count to a ridiculously high number (100000).
Finally got my file imported. BOOM
I have an issue when importing products where 2 stores have the same category name.
eg.
site1/category/subcategory
site2/category/extra/subcategory
Looking at the import query it inserts into url_rewrite this info 2x with only a different target_path, but the constraint is on request_path + store_id (URL_REWRITE_REQUEST_PATH_STORE_ID)
Still have this issue after 2.1 import. no duplicated urls in the db or empty urls.
only got this issue on categories!
Try to setup unique URL Keys for the imported products directly (in CSV data) or init this attribute in the code:
$product = $objectManager->create(ProductInterface::class);
$product->setSku($sku);
...
$product->setUrlKey($sku);
URL key is generated from Product Name value. In my case this error ("_URL key for specified store already exists_") was thrown if product names, prices and weights were equals for the different products (name only equality is not enough for the error). SKU is unique attribute, I have used this trick and no more errors were thrown.
For those that are importing the products via a CSV file or a excel spreadsheet and it was working before but suddenly stop to work.
You probably have a PRODUCT or a CATEGORY been uploaded that already contain the same default URL KEY. Check the products or categories that you manually added or updated. Check their URL KEY attribute.
A painful way to find the error is to separate your spreadsheet in parts, and run them separately until you have a few lines to check.
Same issue using 2.1 importing 183,000 products.
All have Unique Sku's; Unique; Names Unique urls;
Says Valid 183k rows then throws "URL key for specified store already exists"
it only imports 66000 of the 183,000 products with missing information Qty ect..
Also occurring on 2.1 when creating products by code.
In this instance, there are many product with the same name within the same category, however they have unique SKUs.
When generating the URL from the product name, the check to find out if it exists already should also then be able to append (or prepend) the URL with a sequential number - in the same way the image management facility will not overwrite an image, but append the file name with "_1" or "_2".
Same issue using 2.1 importing 500 products.
But, if I separate 500 products in one csv file to 5 copies, which one has 100 products, then importing. It's going to work successfully.
This is not just related to import but can happen when trying to save a product/category as highlighted. Surely a relatively simple fix to append the sku or incremental ? This could be a simple parameter at store level same as the suffix?
Any suggests for a quick 'hack' until a permanent fix is available - perhaps an override to the relevant core file(s)?
On the bespoke code I have created when importing from an XML file, I prepend the url_key
with the current time()
, save it, then change the url_key
to be prepended with the entity_id
.
//Temporarily manually provide a unique URL for the product to stop products which have the same name of being rejected
$product->setUrlKey($product->formatUrlKey(time().'-'.$name));
//Save the product where we are right now, before continuing to give it a Magento ID
$product->save();
//Now we have a unique product ID from Magento, update the URL to include that, rather than the previously issued random number
$product->setUrlKey($product->formatUrlKey($product->getEntityId().'-'.$name));
Hope that helps!
Thanks Devonto - I was thinking more in terms of an override to the vendor/Magento/module-catalog-url-rewrite and related modules which would simply append the sku or EntityId - this would cater for both Admin and Import/Export routines and ensure that the key is always unique however created or updated :)
I havent worked out yet how to override core functionality etc as I am finding M2 a steep learning curve after M1.x
@cghill66 Hope this will give you an idea on what could be done at that level; should you get round to it before a more permanent solution is found.
The issue has been fixed and delivered to the mainline. It is also ported for 2.0 and 2.1 and will be delivered as a part of nearest patch releases.
@slavvka Can we know the commits that fixes this issue?
Thanks.
Another case was that I didn't had the top category name set correctly in the csv file. I have different name instead of Default Category.
I am on 2.1.1 and facing same issue ? I just moved from magento 1.9 to magento 2.1.2 with data migration tools and whenever I am saving category I got this error any help ?
Guys I debug the issue and found the cause I was having ,
My product name and category name were same so it was generating same urls , I assume Magento may have handle this instead of error
@sajidunnar How did you debug? I sometimes run into this issue. Can't tell you exact when and how, but usually when saving an category. In that situation there was a product in a subcategory that caused issues in all parental categories. Removed that product and I was able to save cats again.
This issue ran on Magento 2.1.2. Didn't had time to debug so went for remove and recreate the same product again and it was good (for now). Would love to know where the bug/issue came from.
@Tristan-N I used phpstorm with xdebug to follow the flow of execution as its was having couple of observers before and after save of categories , code was calling aroundReplace from vendor/magento/module-catalog-url-rewrite/Model/Category/Plugin/Storage.php, it has parameters named urls , which has all URL Rewrites of our store( I guess) function is trying to find possible duplicate url rewrites so I debug the urls by exporting in json ( via phpstorm ) But I did saw exception or error from MySQL Duplicate constraint about the actual duplicate url which has stop the process and then we got the main exception of URL rewrite
Before that I removed categories , url rewrite table etc on my dev instance and nothing helped , I think if we have or can log db constrains issues then can find bad url record
NO ,
On Wed, Oct 26, 2016 at 8:53 PM, Sascha Bratton [email protected]
wrote:
@sajidunnar https://github.com/sajidunnar do you have multiple stores?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/1471#issuecomment-256392720,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATGEPuOpN7HO-FErdVtr29uqjPmd6eiks5q33dwgaJpZM4FWupr
.
Sajid Hussain Unar
Magento Ecommerce Consultant | Dacoders Agile Innovations
213-457-3386 | [email protected] | http://www.dacoders.com
LinkedIn: http://linkedin.com/in/sajidhussain
Same issue here with Magento 2.1.2. I set up a blank M2 installation, and imported 150 products and 8 categories with the Migration Tool. Can not make changes to my categories, same error will occur. Can anybody help me?
(Maybe unrelated, maybe related: I can not make some of my attributes show up in the layered navigation for any reason. It worked flawlessly in the magenta 1.9.3 installation. All settings are right.)
Anyone found patch to fix this issue, we are also facing similar issue while product importation in Magento v 2.0.7.
Are you still alive??? IS there any update for this issue.
I raised this issue a few years ago now and still can't see any interest
from the project owner[s] to fix it. I ended up switching to another open
source project. This is the prove I was more than right.
On Fri, Dec 16, 2016 at 9:31 PM, João Costa notifications@github.com
wrote:
Are you still alive??? IS there any update for this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/1471#issuecomment-267689112,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGhHfe-ZpWjOB_nTMuUdHjzOfBm-6EJpks5rIvU7gaJpZM4FWupr
.
Be interesting to know what you moved to as an alternative?
Get Outlook for Androidhttps://aka.ms/ghei36
From: Mirco notifications@github.com
Sent: Sunday, December 18, 2016 3:02:18 PM
To: magento/magento2
Cc: Chris Hill; Mention
Subject: Re: [magento/magento2] 'URL key for specified store already exists.' during product imports (#1471)
I raised this issue a few years ago now and still can't see any interest
from the project owner[s] to fix it. I ended up switching to another open
source project. This is the prove I was more than right.
On Fri, Dec 16, 2016 at 9:31 PM, Jo?o Costa notifications@github.com
wrote:
Are you still alive??? IS there any update for this issue.
-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/1471#issuecomment-267689112,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGhHfe-ZpWjOB_nTMuUdHjzOfBm-6EJpks5rIvU7gaJpZM4FWupr
.
-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/magento/magento2/issues/1471#issuecomment-267825999, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AU4RWkl8puZCktjS5dItDLnRDj5X1Aokks5rJUr6gaJpZM4FWupr.
Same Issue still exists in 2.1.3:
- Specified URL key already exists in row(s): 174, 84, 215
There is not any value in the .csv entered. Shouldn't an empty field of ""
still overwrite any existing value?
Updated to 2.1.3 where the bug was supposed to be fixed, but still have the same error while updating products with the very same url which already exists. Just as side note, it's a multistore project so the url in question is defined for 3 different stores. Should I just insert on duplicate and rewrite/remove url validator? seems easier... but does not leave me comfortable for future updates where the workflow might be changed ;(. BTW could you please assess and if so reopen the issue @slavvka ? and/or a new one with the link to this one?
I got the error URL key for specified store already exists.
after importing products and categories and then trying to save a category. I was using Magento 2.1.3
I found out it was because I had a bunch of products without names and therefore blank URL keys. Deleting the products with blank names fixed it for me.
It could be nice if Magento 2 would tell me that was the problem in the first place.
During my debugging process used a (ugly) hack to narrow down what was causing the problem in \Model\Storage\Abstractstorage\.php
I added the line file_put_contents('/path/to/magento/folder/test.txt', print_r($urls, true));
So it would look like this:
public function replace(array $urls)
{
if (!$urls) {
return;
}
try {
$this->doReplace($urls);
} catch (\Magento\Framework\Exception\AlreadyExistsException $e) {
file_put_contents('/path/to/magento/folder/test.txt', print_r($urls, true));
throw new \Magento\Framework\Exception\AlreadyExistsException(
__('URL key for specified store already exists.')
);
}
}
Any update on this from the Magento team?
@PieterCappelle For what it's worth, if you pull down the latest 2.2.0-dev branch of M2 and try your import, you may get a better insight into what is going wrong. I was doing an import of 30,000 products and found the source of my problem: while the url keys I was attempting to use weren't directly duplicated, two were the same except for a '-' at the end. Magento truncates the dash and was trying to create a duplicate url key. Looks like Magento has done some work improving error reporting on imports in the dev branch.
Tagging @davidalger - Classy Llama has done some debugging around / handling for this recently
@boxyman
I had the same issue:
https://github.com/magento/magento2/issues/6671
@boxyman I also have records with blank product names. I thought that product names were required, so I'm not sure how they got created.
Do you have an automated way to purge those records?
FYI, we have close to 1.5 MILLION parts in our site. We decided early on to create the url-key ourselves, using our own algorithm. I can easily check for duplicates before uploading anything. This was far easier than trying to deal with Magento-created duplicates on the fly.
So, I tried everything. The solution in my case, was the url_key of the products, not the categories. I exported all my products (about 10000) and I changed all the url_key of the products to numbers and letters, BUT, all LOWER case letters. Then I imported everything back again. I was able to save and modify categories again with no URL key error again. Hope this helps. Magento Ver. 2.1.2
@JimDantin No, I only needed a one-time import so I deleted the products manually.
We are still looking for a good workflow that lets us deal with massive amounts of data. I don't mind that individual products get rejected if we could get an audit log of some kind with the skipped SKUs
In CE 2.1.4 issue with duplicate product names still exists. I'm trying to import a csv of exiting products to update the name field. Some of the products have the same name and this prevents the import and throws the duplicate url error even though there isn't a duplicate url.
EDIT:
The offending code is in the function isNeedToValidateUrlKey in module CatalogImportExport Model/Import/Product.php line 2388.
I changed line:
return (!empty($rowData[self::URL_KEY]) || !empty($rowData[self::COL_NAME]))
to
return !empty($rowData[self::URL_KEY])
Hi all. I've got the same error and in my case the reason of getting it was different dashes in the name of the product. Some of the my items were with longer dash "–", the majority with "-".
Once the longer dashes were replaced I've successfully imported the csv.
Magento 2.1.7
BR
Martin
I still have to problem in 2.2.2 The patch in https://github.com/magento/magento2/issues/1471#issuecomment-293903589 fixed it, but I do not understand it.
We have characters like "Ã…" in the product name.
Hello @amenk, this is normally the case resulting from importing the CSV without encoding, as far as my CSV files are concerned. If you use MS Excel for CSV files you will need to first open a blank worksheet and then import the CSV data. Failing that try using OpenOffice as Excel can sometimes make an attempt at being too smart for it's own good. Hope this helps anybody experiencing the same issue with abnormal characters.
@sanjeshsodha
I would say my file is valid UTF8 encoded - still I have the issues.
file CSV.csv
CSV.csv UTF-8 Unicode text, with very long lines
Magento 2.2.3
Okay, turn's out I have actually two products with the exact same name in the import which causes the error. The products differ in the attributes, so this is not an error in the import file.
Shoudln't Magento just add a -1 , -2 and so on to the URL key ?
Magento223 does not seem to check if a auto (by itself!!) generated url already exists and does not add a suffix number to unify it. How can this be an issue in a stable version? There are plenty of shops were products do have the same name.
I was getting this message from a product update csv, with what I thought was the minimal set of fields.
The csv didn't have a url_key field, but it had 'url_path' within the additional_attributes field. The url_path values where unique, but because the url_key field was missing magento looked at the product name field and did auto generation for the url_key, instead of looking at url_path. The product names where duplicated and so this error appeared. Putting the url_path value into the dedicated url_key field cured the issue.
Can't believe this issue is still not fixed. Magento won't accept the same file exported form itself! Even if no modifications are made to that file.
This issue is closed. What do we have to do for a new issue? Or is there a follow-up one?
I am facing the same issue 2.2.6 when products name are same throws this error any solution ?
This worked for me.
1 - No url_key should be the same. Name of the products can be the same but check the url_key
2 - Try to find products with empty name
3 - Export all your product on csv and search for some strange caracters in some line
Good luck
Most helpful comment
@slavvka Can we know the commits that fixes this issue?
Thanks.