Jump to content
thirty bees forum

Post Missing


AndyC

Recommended Posts

Hi

I made a post on Sunday evening about my product page being messed up and I posted the error messages. I can't seem to find it now.

I don't want to have to start from scratch again , if someone could please help

I tried to upload a product CSV then got all these error back .. I tried my back ups but they don't work as it has the wrong file type

Root category must be an integer value
at line 350 in file classes/helper/HelperTreeCategories.php

345.      * @version 1.0.0 Initial version
346.      */
347.     public function setRootCategory($value)
348.     {
349.         if (!Validate::isInt($value)) {
350.             throw new PrestaShopException('Root category must be an integer value');
351.         }
352. 
353.         $this->_root_category = $value;
354. 
355.         return $this;
  • HelperTreeCategoriesCore->setRootCategory - [line 3258 - controllers/admin/AdminProductsController.php] - [1 Arguments]
    3253.             // Generate category selection tree
    3254.             $tree = new HelperTreeCategories('categories-tree', $this->l('Filter by category'));
    3255.             $tree->setAttribute('is_category_filter', (bool) $this->id_current_category)
    3256.                 ->setAttribute('base_url', preg_replace('#&id_category=[0-9]*#', '', static::$currentIndex).'&token='.$this->token)
    3257.                 ->setInputName('id-category')
    3258.                 ->setRootCategory(Category::getRootCategory()->id)
    3259.                 ->setSelectedCategories([(int) $idCategory]);
    3260.             $this->tpl_list_vars['category_tree'] = $tree->render();
    3261. 
    3262.             // used to build the new url when changing category
    3263.             $this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', static::$currentIndex).'&token='.$this->token;
    
  • AdminProductsControllerCore->initContent - [line 262 - classes/controller/Controller.php]
    257.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    258.                 $this->initHeader();
    259.             }
    260. 
    261.             if ($this->viewAccess()) {
    262.                 $this->initContent();
    263.             } else {
    264.                 $this->errors[] = Tools::displayError('Access denied.');
    265.             }
    266. 
    267.             if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
    
  • ControllerCore->run - [line 837 - classes/Dispatcher.php]
    832.             if (isset($paramsHookActionDispatcher)) {
    833.                 Hook::exec('actionDispatcher', $paramsHookActionDispatcher);
    834.             }
    835. 
    836.             // Running controller
    837.             $controller->run();
    838.         } catch (PrestaShopException $e) {
    839.             $e->displayMessage();
    840.         }
    841.     }
    842. 
    
  • DispatcherCore->dispatch - [line 63 - admin/index.php]
    58. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
    59.     $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
    60. }
    61. 
    62. // Prepare and trigger admin dispatcher
    63. Dispatcher::getInstance()->dispatch();
    
Link to comment
Share on other sites

Thank you.. I realised after that I deleted everything ... I put a root category back but it still doesn't let me in ... Is it because the products are not looking at root ..If yres how can I go about fixing please

Link to comment
Share on other sites

It's clearly a bug. Whatever a merchant does, misalignments should return an informative error message rather than triggering an exception.

In the previous thread I already asked what you're doing. Which controller, which input file, such stuff. Developers can only fix what they can reproduce.

Link to comment
Share on other sites

17 hours ago, AndyC said:

Thank you.. I realised after that I deleted everything ... I put a root category back but it still doesn't let me in ... Is it because the products are not looking at root ..If yres how can I go about fixing please

Did you put both a root and a home back?

My suggestion: export the category tables from a fresh installation and import them in yours.

Link to comment
Share on other sites

I've tried , but there is no way to get a proper csv out .. It always puts everything into 1 tab like this id;"Name";"Description";"Position";"Displayed";

Yes I know it's my fault for not making a backup .. I may just drop the whole database and start again

Link to comment
Share on other sites

4 hours ago, AndyC said:

I've tried , but there is no way to get a proper csv out .. It always puts everything into 1 tab like this id;"Name";"Description";"Position";"Displayed";

Yes I know it's my fault for not making a backup .. I may just drop the whole database and start again

Why would you like a csv? Use phpmyadmin and export those 4 tables (you can leave tb_category_product out) from the new install, delete the same tables in your existing installation and then import them.

Link to comment
Share on other sites

I only know CSV .. Anyway I found a csv upload module and I think I have found my issue in it .. I only put the Category , I see from a new install it reads Home,category ..

Hopefully I'll be OK now as my database is now doing backups so will have something to restore if all goes pear shaped again as I have months and months of work ahead of me and a csv will help a lot

 

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...