Jump to content

(SOLVED) [PrestaShopDatabaseException] error when enabling multistore


Recommended Posts

Hi all,

 

A problem accured, when I tried to enable multistore, when i trie to open front office i get this message from db:

[PrestaShopDatabaseException]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND nright <= AND c.id_category IN ( SELECT id_category FROM `ps_cat' at line 8


			SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
			FROM `ps_category` c
			INNER JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = 2 AND cl.id_shop = 1 )
			INNER JOIN `ps_category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = 1)
			WHERE (c.`active` = 1 OR c.`id_category` = 0)
			AND c.`id_category` != 1
			 AND `level_depth` <= 4
			AND nleft >=  AND nright <= 
			AND c.id_category IN (
				SELECT id_category
				FROM `ps_category_group`
				WHERE `id_group` IN (1)
			)
			ORDER BY `level_depth` ASC, cs.`position` ASC

at line 635 in file classes/db/Db.php
629. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
630. 		}
631. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
632. 		{
633. 			if ($sql)
634. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
635. 			throw new PrestaShopDatabaseException($this->getMsgError());
636. 		}
637. 	}
638. 
639. 	/**
DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 501 - classes/db/Db.php] - [1 Arguments]
DbCore->executeS - [line 226 - modules/blockcategories/blockcategories.php] - [1 Arguments]
BlockCategories->hookLeftColumn - [line 509 - classes/Hook.php] - [1 Arguments]
HookCore::exec - [line 449 - classes/controller/FrontController.php] - [1 Arguments]
FrontControllerCore->initContent - [line 37 - controllers/front/IndexController.php]
IndexControllerCore->initContent - [line 180 - classes/controller/Controller.php]
ControllerCore->run - [line 373 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]

when disabling multistore, i get the same problem.

 

Thank you in advance, any help will be helpful...

Edited by JustinasBNP (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...