To create a support ticket, start a search

Error - CSV Import: Check and correct the field level_depth


During your CSV import, you get the message:

"Check and correct the level_depth field" from the menu Catalog > Tools to edit your categories (id_category:819)

 

This erreur indicates a problem with category ID 819 (for this example only) within your PrestaShop database.

To fix this error, 3 solutions are possible.

 

 In Store Commander interface > Catalog > Tools > Check and Fix Categories
​Once the OK confirmation pops up at the bottom right corner, restart your import
 

 If the problem remain, the integrity problem in your database for this category is confirmed.

You then need ot look into the database tables in order to identify the category (by phpMyAdmin for instance). Taking the category ID in this example:

- If id_category 819 is not present in the table ps_category but id_category 819 is present in the category ps_category_lang:

Create a new entry in the table ps_category with the id_category = 819 ; id_parent = 1; position = 999
You will find the category at the root of your website

- If id_category 819 is present in the table ps_category but id_category 819 is not present in the category ps_category_lang:

Delete data related to id_category 819 in the table ps_category

- If id_category 819 is not present in the table ps_category and that id_category 819 is not present in the category ps_category_lang:

Look into ps_category if id_parent 819 exists: if it does exist, then replace the valuel id_parent 819 by id_parent 1: you will find this category at the root of your website.

- If id_category 819 is present in table ps_category_shop and is not present in ps_category AND is not used as id_parent:

Delete data related to id_category 819 in ps_category_shop

 If you don't know how to work in the databse, of if you want to save time to resolve this type of problem (amongst others), you could buy our FixMyPrestaShop addon, which detects and fixes this kind of issue, without having to log onto your database.

 


Download our themed Guides to learn how to manage your shop at lightning speed with Store Commander.