Jump to content

Recommended Posts

Nous avons régulièrement des bug sur le site et le denier en date qui nous a tout planté génère ce message suite à la mise à jour proposée par prestashop de plusieurs module.

[PrestaShopDatabaseException]

Unknown column 'cl.id_shop' in 'where clause'


SELECT cl.`meta_title`, cl.`link_rewrite`
            FROM `pss_cms_lang` cl
            INNER JOIN `pss_cms` c
            ON (cl.`id_cms` = c.`id_cms`)
            WHERE cl.`id_cms` = 3
            AND (c.`active` = 1 OR c.`id_cms` = 1)
            AND cl.`id_shop` = 1
            AND cl.`id_lang` = 1 LIMIT 1

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

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

 '.$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 547 - classes/db/Db.php] - [1 Arguments]
DbCore->getRow - [line 325 - modules/blockcms/BlockCMSModel.php] - [1 Arguments]
BlockCMSModel::getCMSMetaTitle - [line 279 - modules/blockcms/BlockCMSModel.php] - [1 Arguments]
BlockCMSModel::getCMSTitlesFooter - [line 861 - modules/blockcms/blockcms.php]
BlockCms->hookFooter - [line 509 - classes/Hook.php] - [1 Arguments]
HookCore::exec - [line 809 - classes/controller/FrontController.php] - [1 Arguments]
FrontControllerCore->initFooter - [line 185 - classes/controller/Controller.php]
ControllerCore->run - [line 373 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]

Avez vous une idée pour corriger le problème de fond ?
Nous sommes en train de changer de thème et on avait enfin réussi à me restaurer le site donc là il marchait et j’étais en train de tout re-paramétrer lorsque j’ai mis à jour les modules comme proposé et ça a de nouveau tout replanté avec le même message d’erreur.

 

Merci d'avance de votre aide
 

Link to comment
Share on other sites

Je complète le message par les liens complets :

 

[PrestaShopDatabaseException]

Unknown column 'cl.id_shop' in 'where clause'
 

SELECT cl.`meta_title`, cl.`link_rewrite`			FROM `pss_cms_lang` cl			INNER JOIN `pss_cms` c			ON (cl.`id_cms` = c.`id_cms`)			WHERE cl.`id_cms` = 3			AND (c.`active` = 1 OR c.`id_cms` = 1)			AND cl.`id_shop` = 1			AND cl.`id_lang` = 1 LIMIT 1
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]
    Argument [0]SELECT cl.`meta_title`, cl.`link_rewrite`			FROM `pss_cms_lang` cl			INNER JOIN `pss_cms` c			ON (cl.`id_cms` = c.`id_cms`)			WHERE cl.`id_cms` = 3			AND (c.`active` = 1 OR c.`id_cms` = 1)			AND cl.`id_shop` = 1			AND cl.`id_lang` = 1 LIMIT 1
  • DbCore->query - [line 547 - classes/db/Db.php] - [1 Arguments]
    Argument [0]SELECT cl.`meta_title`, cl.`link_rewrite`			FROM `pss_cms_lang` cl			INNER JOIN `pss_cms` c			ON (cl.`id_cms` = c.`id_cms`)			WHERE cl.`id_cms` = 3			AND (c.`active` = 1 OR c.`id_cms` = 1)			AND cl.`id_shop` = 1			AND cl.`id_lang` = 1 LIMIT 1
  • DbCore->getRow - [line 325 - modules/blockcms/BlockCMSModel.php] - [1 Arguments]
    319. 			WHERE cl.`id_cms` = '.(int)$id.'320. 			AND (c.`active` = 1 OR c.`id_cms` = 1)321. 			AND cl.`id_shop` = '.(int)Context::getContext()->shop->id.'322. 			AND cl.`id_lang` = '.(int)Context::getContext()->language->id;323. 324. 		return Db::getInstance()->getRow($sql);325. 	}326. 327. 	public static function getCMSCategoriesByLocation($location, $id_shop = false)328. 	{329. 		$context = Context::getContext();
  • BlockCMSModel::getCMSMetaTitle - [line 279 - modules/blockcms/BlockCMSModel.php] - [1 Arguments]
    273. 				$content[$cmsCategory]['link'] = $context->link->getCMSCategoryLink((int)$ids[1], $query['link_rewrite']);274. 				$content[$cmsCategory]['meta_title'] = $query['name'];275. 			}276. 			else if ($ids[0] == 0 && isset($ids[1]))277. 			{278. 				$query = BlockCMSModel::getCMSMetaTitle($ids[1]);279. 				$content[$cmsCategory]['link'] = $context->link->getCMSLink((int)$ids[1], $query['link_rewrite']);280. 				$content[$cmsCategory]['meta_title'] = $query['meta_title'];281. 			}282. 		}283. 
  • BlockCMSModel::getCMSTitlesFooter - [line 861 - modules/blockcms/blockcms.php]
    855. 			$display_poweredby = Configuration::get('FOOTER_POWEREDBY');856. 			$this->smarty->assign(857. 				array(858. 					'block' => 0,859. 					'contact_url' => 'contact',860. 					'cmslinks' => BlockCMSModel::getCMSTitlesFooter(),861. 					'display_stores_footer' => Configuration::get('PS_STORES_DISPLAY_FOOTER'),862. 					'display_poweredby' => ((int)$display_poweredby === 1 || $display_poweredby === false),863. 					'footer_text' => Configuration::get('FOOTER_CMS_TEXT_'.(int)$this->context->language->id),864. 					'show_price_drop' => Configuration::get('FOOTER_PRICE-DROP'),865. 					'show_new_products' => Configuration::get('FOOTER_NEW-PRODUCTS'),
  • BlockCms->hookFooter - [line 509 - classes/Hook.php] - [1 Arguments]
    503. 504. 				// Call hook method505. 				if ($hook_callable)506. 					$display = $moduleInstance->{'hook'.$hook_name}($hook_args);507. 				elseif ($hook_retro_callable)508. 					$display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);509. 				// Live edit510. 				if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))511. 				{512. 					$live_edit = true;513. 					$output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']);
  • HookCore::exec - [line 809 - classes/controller/FrontController.php] - [1 Arguments]
    803. 	}804. 805. 	public function initFooter()806. 	{807. 		$this->context->smarty->assign(array(808. 			'HOOK_FOOTER' => Hook::exec('displayFooter'),809. 			'conditions' => Configuration::get('PS_CONDITIONS'),810. 			'id_cgv' => Configuration::get('PS_CONDITIONS_CMS_ID'),811. 			'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME'),812. 			'PS_ALLOW_MOBILE_DEVICE' => isset($_SERVER['HTTP_USER_AGENT']) && (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE') && @filemtime(_PS_THEME_MOBILE_DIR_)813. 		));
  • FrontControllerCore->initFooter - [line 185 - classes/controller/Controller.php]
    179. 				$this->initContent();180. 			else181. 				$this->errors[] = Tools::displayError('Access denied.');182. 183. 			if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))184. 				$this->initFooter();185. 186. 			// default behavior for ajax process is to use $_POST[action] or $_GET[action]187. 			// then using displayAjax[action]188. 			if ($this->ajax)189. 			{
  • ControllerCore->run - [line 373 - classes/Dispatcher.php]
    367. 			// Execute hook dispatcher368. 			if (isset($params_hook_action_dispatcher))369. 				Hook::exec('actionDispatcher', $params_hook_action_dispatcher);370. 371. 			// Running controller372. 			$controller->run();373. 		}374. 		catch (PrestaShopException $e)375. 		{376. 			$e->displayMessage();377. 		}
  • DispatcherCore->dispatch - [line 28 - index.php]
    22. *  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)23. *  International Registered Trademark & Property of PrestaShop SA24. */25. 26. require(dirname(__FILE__).'/config/config.inc.php');27. Dispatcher::getInstance()->dispatch();
Link to comment
Share on other sites

Ah et puis j'ai aussi ça maintenant au dessus de la descrpition de mes produits...

 

Notice: Undefined index: HOOK_HOME_SECONDARY_LEFT in /home/rugbycor/www/home/cache/smarty/compile/99/80/e6/9980e6b70bdfe50a813939bc8fc0ab6f727e6da9.file.index.tpl.php on line 42

Notice: Trying to get property of non-object in /home/rugbycor/www/home/cache/smarty/compile/99/80/e6/9980e6b70bdfe50a813939bc8fc0ab6f727e6da9.file.index.tpl.php on line 42

 

 

 

Le n° de la ligne change en fonction des produit...

Link to comment
Share on other sites

  • 3 months later...

Bonjour,

 

j'ai un problème qui semble très similaire, sauf que je suis DEJA en 1.6.1.1... cela m'a été afficher en voulant configurer le module "Top Horizontal Menu":

si quelqu'un a une idée :/

 

 

Champ 'cl.id_shop' inconnu dans where clause
 

SELECT bcp.`id_cms_category`, bcp.`id_parent`, bcp.`level_depth`, bcp.`active`, bcp.`position`, cl.`name`, cl.`link_rewrite`				FROM `ps_cms_category` bcp INNER JOIN `ps_cms_category_shop` cs			ON (bcp.`id_cms_category` = cs.`id_cms_category`)				INNER JOIN `ps_cms_category_lang` cl				ON (bcp.`id_cms_category` = cl.`id_cms_category`)				WHERE cl.`id_lang` = 5				AND bcp.`id_parent` = 0 AND cs.`id_shop` = 1 AND cl.`id_shop` = 1
Edited by hoover91 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Bonjour,

 

je crois que c'est toujours un problème de module, une âme charitable m'avait aider à débuguer mais maintenant j'ai ceci quand je veux enregistrer ma page "à propos":

 

Champ "id_shop" inconnu dans WHERE CL

SELECT *

FROM ps_cms_category_lang

WHERE "id_cms_category"=1

AND "id_shop"=1

 

Sauf que j'ai tous ces champs dans la BDD et je ne comprends pas pourquoi c'est un problème qu'ils soient égal à 1... Je ne demande pas forcément la réponse toute faite mais au moins une piste pour savoir vers ou chercher..

 

merci si réponse il y a !

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