Jump to content

Parent category does not exist


maria zagula

Recommended Posts

Hi experts!

I modified database manually (I know, I know ... shame of me). After that sometimes I get such an error:

Parent category does not exist
at line 397 in file classes/Category.php

392.             return 0;
393.         }
394. 
395.         $parent_category = new Category((int)$this->id_parent);
396.         if (!Validate::isLoadedObject($parent_category)) {
397.             throw new PrestaShopException('Parent category does not exist');
398.         }
399.         return $parent_category->level_depth + 1;
400.     }
401. 
402.     /**
CategoryCore->calcLevelDepth - [line 196 - classes/Category.php]
CategoryCore->update - [line 1158 - modules/nvn_import_products/nvn_import_products.php]
nvn_import_products->importCategories - [line 2009 - modules/nvn_import_products/nvn_import_products.php]
nvn_import_products->runProcessing - [line 590 - modules/nvn_import_products/nvn_import_products.php]
nvn_import_products->getContent - [line 867 - controllers/admin/AdminModulesController.php]
AdminModulesControllerCore->postProcessCallback - [line 1116 - controllers/admin/AdminModulesController.php]
AdminModulesControllerCore->postProcess - [line 178 - classes/controller/Controller.php]
ControllerCore->run - [line 367 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 58 - admin/index.php] 

or sometimes

FAILURE STOP in previous run. Skipping faulty Category ID: 1 

Somewhere I read that this is because I deleted (modifed) two first rows in ps_category (Id =1 , id=2). I try to recover origunal rows, partially it works. I can see all categories, subcategories. I can add new elements to them without problem. Hovewer sometimes I still get error descrivted above.

 

In Attach Files I post some records of ps_category, ps_category_lang and ps_category_shop

 

Please, please help ! :)

 

Best regards

Maria

 

post-1230556-0-87961900-1468950700_thumb.jpg

post-1230556-0-21792900-1468950702_thumb.jpg

post-1230556-0-90429100-1468950702_thumb.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...