To create a support ticket, start a search

Check and correct the field level_depth (Cat ID0)


You get this error during a CSV import (products or categories);

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

 

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

To fix this error, 3 solutions are possible.

 

1. Apply the option in Sc interface > Catalog > Tools > Check and Fix Categories
​Once the OK confirmation pops up at the top right corner, restart your import
 

2. If the error popups again run the controls of FixMyPrestaShop, accessible from Sc > Tools menu.
You can filter by controls on Categories only if you want the scan to be quicker.
The problem should be found and you apply the corresponding fix provided in the right handside panel.
You can then run your import again.


3. If none of the previous two solutions fix the error during your import, then it will need to be checked and fixed within your database.
At this point, you'll need to contact your web agency for them to log onto your database to check and fix the issue.
Here are some technical information you can pass onto.

- Check in category table:

  • Root category of the shop should have:
         id_parent 0
         level_depth 0
         is_root_category 0
     
  • Home category should have:
         id_parent id of root category
         level_depth 1
         is_root_category 1
     
  • only Root category should have id_parent à 0
     
  • only Home type categories should have is_root_category on 1

 

- Check in configuration table

  • PS_ROOT_CATEGORY should have the same id as the Root category in table category
     
  • PS_HOME_CATEGORY should have the same id as Home category in table category (beware of multistore!)