NopCommerce 4.1 cannot import Categories or Products if the same name is listed twice under different categories

1 year ago
When trying to import products into a site that has for example, the name tables under two or more categories or sub-categories, I get the following error? I did not have this problem with earlier versions.

Categories with the same name are not supported in the same category level. Check your category list in "Catalog -> Categories" page

For example,

Classroom Furniture >> Early Ed >> Tables

Classroom Furniture >> Tables

Classroom Furniture >> Tables >> Activity Tables

Art/Music >> Tables

Science Labs >> Tables

Can anyone help?
1 year ago
I even made each category name unique and still the products will not import, even if I just import 1 row and setting it to a unique category.
1 year ago
imported unique categories in Nopcommerce 4.1, checked the DB, every category name is unique, yet when I try to import products, I get this error :
Categories with the same name are not supported in the same category level. Check your category list in "Catalog -> Categories" page

Why would this be? is Nop running out of memory? I have noticed that I have to import the category list TWICE, the first time I get errors that some categories have not loaded, so I import the same XLS file again and it loads without error?

Any idea what is going on?

1 year ago
Check the System Log message to see if there is more detail.  Post it here
1 year ago
Thanks for the response. When I import a category XLS file with unique category and sub-category names, this is the error I get. I have to restart the application each time I want to import categories because if I don't, it does not load as many categories as it does when the site is restarted. if I import a 2nd, 3rd, and 4th time, all the categories eventually import but then I am not able to import products because I get an error that I have duplicate categories. I would like to keep the same name under different parent categories but it seems I am unable to do so. for example, I would like to have "Storage" under Classrooms and Media.

Short message

System.ArgumentException: Categories with the following names aren't imported - Accessories, Accessories & Components, Activity Tables, Art Seating, Art Storage, Art Tables, Big & Tall/Bariatric, Bookcases, Bookcases/Shelving, Borads Technology, Bulletin Boards, Cabinets, Café Tables, Carrels, Circulation Desk, Combination, Computer Tables, Conference, Conference Boards, Conference Chairs, Corkboards, Cubicles, Demonstration & Instruction, Drafting Tables, Drying Racks, Fixed Tables, Flip Top Tables, Folding, Guest Seating, Hutches, Instrument Storage, Lounge & Reception Seating, Maker Space, Managers & Executive Seating, Media Chairs, Media Soft Seating, Media Tables, Mobile Cafeteria Tables, Mobile Convertible Tables, Office Desks, Office Seating, Office Sofas & Loveseats, Office Stack Chairs, Office Storage, Office Tables, Office Task Chairs, Office Workstations, Open Storage, Partitions, Pedestals, Podiums, Reception, Reception Desks, Reception Seating, Reception Tables, Replacements & Skins, Risers/Stages, Science Seating, Science Stools, Science Storage, Science Tables, Sit/Stand Desks, Sit/Stand Tables, Stem/Steam, Student Desks, Supplies, Systems, Teacher’s Desks, Training/Seminar Tables, Trophy Cases, Whiteboards, Workstations
   at Nop.Services.ExportImport.ImportManager.ImportCategoriesFromXlsx(Stream stream) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\ExportImport\ImportManager.cs:line 2094
   at Nop.Web.Areas.Admin.Controllers.CategoryController.ImportFromXlsx(IFormFile importexcelfile) in C:\andrei\nopcommerce\sources\src\Presentation\Nop.Web\Areas\Admin\Controllers\CategoryController.cs:line 473
1 year ago
Here is list of all the category names, you will see that each name is in fact unique so I must be missing something.

"Wobble" Chairs/Stools
Accessories & Components
Activity Tables
Art Seating
Art Storage
Art Tables
Big & Tall/Bariatric
Boards Technology
Bulletin Boards
Café Tables
Circulation Desk
Classroom Carpets
Classroom Furniture
Classroom Storage
Classroom Tables
Computer Tables
Conference Boards
Conference Chairs
Demonstration & Instruction
Drafting Tables
Dramatic Play
Drying Racks
Early Ed
Early Ed Chairs
Early Ed Lockers
Early Ed Storage
Early Ed Tables
Fixed Tables
Flip Top Tables
Folding Chairs
Guest Seating
Infants & Toddlers
Instrument Storage
Lounge & Reception Seating
Maker Space
Managers & Executive Seating
Media Center
Media Chairs
Media Soft Seating
Media Tables
Mobile Cafeteria Tables
Mobile Convertible Tables
Office Desks
Office Seating
Office Sofas & Loveseats
Office Stack Chairs
Office Storage
Office Tables
Office Task Chairs
Office Workstations
Open Storage
Reception Desks
Reception Seating
Reception Tables
Replacements & Skins
Science Labs
Science Seating
Science Stools
Science Storage
Science Tables
Sit/Stand Desks
Sit/Stand Tables
Sofas & Loveseats
Soft Seating
Stack Chairs
Student Desks
Task Chairs
Teacher’s Desks
Training/Seminar Tables
Trophy Cases
7 months ago
im getting this error on 4.2 also.

did you find out why this happens?
7 months ago
I had to break the category import up in to multiple files. for example, categories 1-10 in one file and 10-20 in another file. I think it may have something to do with the shared hosting I am, where Nopcommerce is not getting the resources it needs. This was not a problem with a dedicated machine. You should also be able to reimport a category xls file, if the category exists it should update and if it does not it will add. I did the same with the products load. Broke up the file into many different files. Also make sure the category name is spelled exactly as it is loaded into Nop. I had some issue with quotes. if the quote is different than was what loaded, it will not find the category.
3 months ago
Hi I'm getting the same error with 4,2 version. Any idea how to fix it?

Categories with the same name are not supported in the same category level. Check your category list in "Catalog -> Categories" page
complete message:  
System.ArgumentException: Categories with the same name are not supported in the same category level. Check your category list in "Catalog -> Categories" page
   at Nop.Services.ExportImport.ImportManager.ImportProductsFromXlsx(Stream stream)
   at Nop.Web.Areas.Admin.Controllers.ProductController.ImportExcel(IFormFile importexcelfile) in C:\andrei\nopcommerce\sources\src\Presentation\Nop.Web\Areas\Admin\Controllers\ProductController.cs:line 2280
3 months ago
Looks like you cannot have the same category name at the same level, for example:

Art >> Music >> subcategory1
Art >> Music >> subcategory1

if you have the same category name, make sure it is unique, for example, you can have "
Storage" multiple times but they have to be under different categories, for example: see "Storage" below

Classroom Furniture >> Early Ed >> Storage

Classroom Furniture >> Storage >> Open Storage

Art/Music >> Storage >> Instrument Storage

Science Labs >> Storage

Office >> Storage


hope this helps.