Jump to content

Upgrade Prestashop Database exception


Recommended Posts

Guys, need your help !

Upgraded site from 1.4.8.2 to 1.5.4.1 and after finishing the process, i can access the back office perfectly, but store front shows error 500.

 

Turned on debug and need your help please : here is the error:

 

Unknown column 'll.link' in 'field list'

SELECT l.id_linksmenutop, l.new_window, ll.link, ll.label

FROM ps_linksmenutop l

LEFT JOIN ps_linksmenutop_lang ll ON (l.id_linksmenutop = ll.id_linksmenutop AND ll.id_lang = 1 AND ll.id_shop=1)

WHERE 1 AND l.id_linksmenutop = "14"

AND l.id_shop IN (0, 1)

 

at line 607 in file classes/db/Db.php

 

601. WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);

602. }

603. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

604. {

605. if ($sql)

[color=#F20000][b]606. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

[/b][/color]607. throw new PrestaShopDatabaseException($this->getMsgError());

608. }

609. }

610.

611. /**[/font][/color]

Link to comment
Share on other sites

Hi,

 

first you need to go to modules/blocktopmenu/menutoplink.class.php line 31 and change

 

$sql = 'SELECT l.id_linksmenutop, l.new_window, ll.link, ll.label

 

to

 

$sql = 'SELECT l.id_linksmenutop, l.new_window, l.link, ll.label

 

(remove 1 l before ".link")

 

Then when you try to see your site you will get another error which you can sort out by altering the ps_linksmenutop table:

 

ALTER TABLE `ps_linksmenutop` ADD `id_shop` INT( 4 ) NOT NULL DEFAULT '1'

 

you need to run the command in phpmyadmin.

 

Good luck!

  • Like 1
Link to comment
Share on other sites

Bonjour,

 

j'ai mise à jour prestashop 1.4.10 vers 1.5.4.1 et j'ai des messages d'erreurs:

 

 

[PrestaShopDatabaseException]

 

Unknown column 'id_pl_easyfooter' in 'field list'

 

DELETE FROM `ps_pl_easyfooter_lang` WHERE `id_pl_easyfooter` NOT IN (SELECT `id_pl_easyfooter` FROM `ps_pl_easyfooter`)

 

at line 607 in file classes/db/Db.php

 

601. WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);

602. }

603. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

604. {

605. if ($sql)

606. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

607. throw new PrestaShopDatabaseException($this->getMsgError());

608. }

609. }

610.

611. /**

DbCore->displayError - [line 307 - classes/db/Db.php] - [1 Arguments]

DbCore->query - [line 447 - classes/db/Db.php] - [1 Arguments]

DbCore->execute - [line 302 - modules/pscleaner/pscleaner.php] - [1 Arguments]

PSCleaner::checkAndFix - [line 52 - modules/pscleaner/pscleaner.php] - [0 Argument]

PSCleaner->getContent - [line 675 - controllers/admin/AdminModulesController.php] - [0 Argument]

AdminModulesControllerCore->postProcessCallback - [line 795 - controllers/admin/AdminModulesController.php] - [0 Argument]

AdminModulesControllerCore->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument]

ControllerCore->run - [line 349 - classes/Dispatcher.php] - [0 Argument]

DispatcherCore->dispatch - [line 50 - admin033/index.php] - [0 Argument]

 

Merci pour votre soutien

Link to comment
Share on other sites

  • 4 months later...

Bonjour,

Au moment où j'ai autorisé la gestion des stocks avancés et que je me dirige sur la rubrique "gestion des stocks" sur la catégorie "stock" on me redirige sur cette page:

[PrestaShopDatabaseException]

Unknown column 'cl.name' in 'where clause' SELECT SQL_CALC_FOUND_ROWS b.*, a.* , a.id_product as id, COUNT(pa.id_product_attribute) as variations FROM `ps_product` a LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product` AND b.`id_lang` = 5) LEFT JOIN `ps_product_attribute` pa ON (pa.id_product = a.id_product) LEFT JOIN ps_product_attribute_shop product_attribute_shop ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop IN (1)) WHERE 1 AND a.cache_is_pack = 0 AND a.is_virtual = 0 AND b.`name` LIKE '%Coussin%' AND cl.`name` LIKE '%Coussin%' GROUP BY a.id_product ORDER BY a.id_product ASC LIMIT 0,300

at line 605 in file classes/db/Db.php

599. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);600. 		}601. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))602. 		{603. 			if ($sql)604. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');605. 			throw new PrestaShopDatabaseException($this->getMsgError());606. 		}607. 	}608. 609. 	/**
  • DbCore->displayError - [line 307 - classes/db/Db.php] - [1 Arguments]
    Argument [0]		SELECT SQL_CALC_FOUND_ROWS		b.*, a.*		, a.id_product as id, COUNT(pa.id_product_attribute) as variations		FROM `ps_product` a		LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product` AND b.`id_lang` = 5)		LEFT JOIN `ps_product_attribute` pa ON (pa.id_product = a.id_product) LEFT JOIN ps_product_attribute_shop product_attribute_shop		ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop IN (1)) 				WHERE 1 AND a.cache_is_pack = 0 AND a.is_virtual = 0  AND b.`name` LIKE '%Coussin%'  AND cl.`name` LIKE '%Coussin%' 		GROUP BY a.id_product 				ORDER BY a.id_product ASC LIMIT 0,300
  • DbCore->query - [line 482 - classes/db/Db.php] - [1 Arguments]
    Argument [0]		SELECT SQL_CALC_FOUND_ROWS		b.*, a.*		, a.id_product as id, COUNT(pa.id_product_attribute) as variations		FROM `ps_product` a		LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product` AND b.`id_lang` = 5)		LEFT JOIN `ps_product_attribute` pa ON (pa.id_product = a.id_product) LEFT JOIN ps_product_attribute_shop product_attribute_shop		ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop IN (1)) 				WHERE 1 AND a.cache_is_pack = 0 AND a.is_virtual = 0  AND b.`name` LIKE '%Coussin%'  AND cl.`name` LIKE '%Coussin%' 		GROUP BY a.id_product 				ORDER BY a.id_product ASC LIMIT 0,300
  • DbCore->executeS - [line 2110 - classes/controller/AdminController.php] - [1 Arguments]
    2104. 		'.$having_clause.'2105. 		ORDER BY '.(($order_by == $this->identifier) ? 'a.' : '').pSQL($order_by).' '.pSQL($order_way).2106. 		($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : '').2107. 		(($use_limit === true) ? ' LIMIT '.(int)$start.','.(int)$limit : '');2108. 2109. 		$this->_list = Db::getInstance()->executeS($this->_listsql);2110. 		$this->_listTotal = Db::getInstance()->getValue('SELECT FOUND_ROWS() AS `'._DB_PREFIX_.$this->table.'`');2111. 	}2112. 2113. 	public function getLanguages()2114. 	{
  • AdminControllerCore->getList - [line 866 - controllers/admin/AdminStockManagementController.php] - [6 Arguments]
    860. 	 * AdminController::getList() override861. 	 * @see AdminController::getList()862. 	 */863. 	public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)864. 	{865. 		parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);866. 867. 		if ($this->display == 'list')868. 		{869. 			// Check each row to see if there are combinations and get the correct action in consequence870. 			$nb_items = count($this->_list);
  • AdminStockManagementControllerCore->getList - [line 1461 - classes/controller/AdminController.php] - [1 Arguments]
    1455. 	 */1456. 	public function renderList()1457. 	{1458. 		if (!($this->fields_list && is_array($this->fields_list)))1459. 			return false;1460. 		$this->getList($this->context->language->id);1461. 1462. 		// Empty list is ok1463. 		if (!is_array($this->_list))1464. 			return false;1465. 
  • AdminControllerCore->renderList - [line 115 - controllers/admin/AdminStockManagementController.php] - [0 Argument]
    109. 		$this->displayInformation($this->l('Note that if you want to increase quantities of multiple products at once, you can use the "Supply orders" page under the "Stock" menu.').'<br />');110. 		$this->displayInformation($this->l('Finally, you will be asked to specify the state of the quantity you will add:'));111. 		$this->displayInformation($this->l('Usable for sale means that this quantity will be available in your shop(s),'));112. 		$this->displayInformation($this->l('otherwise it will be considered reserved (i.e. for other purposes).'));113. 114. 		return parent::renderList();115. 	}116. 117. 	/**118. 	 * AdminController::renderForm() override119. 	 * @see AdminController::renderForm()
  • AdminStockManagementControllerCore->renderList - [line 1414 - classes/controller/AdminController.php] - [0 Argument]
    1408. 			$this->content .= $this->renderView();1409. 		}1410. 		elseif (!$this->ajax)1411. 		{1412. 1413. 			$this->content .= $this->renderList();1414. 			$this->content .= $this->renderOptions();1415. 1416. 			// if we have to display the required fields form1417. 			if ($this->required_database)1418. 				$this->content .= $this->displayRequiredFields();
  • AdminControllerCore->initContent - [line 1080 - controllers/admin/AdminStockManagementController.php] - [0 Argument]
    1074. 			}1075. 		}1076. 		else1077. 		{1078. 			$this->display = 'list';1079. 			parent::initContent();1080. 		}1081. 	}1082. 1083. 	 /**1084. 	 * Display addstock action link
  • AdminStockManagementControllerCore->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument]
    161. 162. 			if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))163. 				$this->initHeader();164. 165. 			if ($this->viewAccess())166. 				$this->initContent();167. 			else168. 				$this->errors[] = Tools::displayError('Access denied.');169. 170. 			if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))171. 				$this->initFooter();
  • ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument]
    342. 			// Execute hook dispatcher343. 			if (isset($params_hook_action_dispatcher))344. 				Hook::exec('actionDispatcher', $params_hook_action_dispatcher);345. 346. 			// Running controller347. 			$controller->run();348. 		}349. 		catch (PrestaShopException $e)350. 		{351. 			$e->displayMessage();352. 		}
  • DispatcherCore->dispatch - [line 50 - backoffice/index.php] - [0 Argument]
    44. 	$_POST['controller'] = strtolower($_POST['tab']);45. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']))46. 	$_REQUEST['controller'] = strtolower($_REQUEST['tab']);47. 48. // Prepare and trigger admin dispatcher49. Dispatcher::getInstance()->dispatch();

 

Il doit y avoir un problème avec ma base de donnée qui du coup n'arrive pas à interpréter cette requête! Je ne sais pas... Il n'y a aucune informations sur ce genre de problème (Prestashop Exception) , le seul moyen de resoude ces erreurs sont d'acheter un pack support à 700 euros ...

Link to comment
Share on other sites

  • 1 year later...

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