Jump to content

Recommended Posts

Posted (edited)

Me aparecen estos errores que no sé como solucionar:

 

[PrestaShopDatabaseException]

Unknown column 'scenes' in 'where clause'
 

SELECT * FROM `ps_image_type` WHERE 1 AND `scenes` = 1 ORDER BY `name` ASC


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

786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 790. if ($sql) { 791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 792. } 793. 794. throw new PrestaShopDatabaseException($this->getMsgError()); 795. } 796. }


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

Argument [0] SELECT * FROM `ps_image_type` WHERE 1 AND `scenes` = 1 ORDER BY `name` ASC

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

Argument [0] SELECT * FROM `ps_image_type` WHERE 1 AND `scenes` = 1 ORDER BY `name` ASC

DbCore->executeS - [line 108 - classes/ImageType.php] - [1 Arguments]

103. $query = 'SELECT * FROM `'._DB_PREFIX_.'image_type` '.$where.' ORDER BY `width` DESC, `height` DESC, `name`ASC'; 104. } else { 105. $query = 'SELECT * FROM `'._DB_PREFIX_.'image_type` '.$where.' ORDER BY `name` ASC'; 106. } 107. 108. self::$images_types_cache[$type] = Db::getInstance()->executeS($query); 109. } 110. return self::$images_types_cache[$type]; 111. } 112. 113. /**

ImageTypeCore::getImagesTypes - [line 435 - controllers/admin/AdminImagesController.php] - [1 Arguments]

430. 'stores' => $this->l('Stores') 431. ); 432. 433. $formats = array(); 434. foreach ($types as $i => $type) { 435. $formats[$i] = ImageType::getImagesTypes($i); 436. } 437. 438. $this->context->smarty->assign(array( 439. 'types' => $types, 440. 'formats' => $formats,

AdminImagesControllerCore->initRegenerate - [line 750 - controllers/admin/AdminImagesController.php]

745. } 746. 747. public function initContent() 748. { 749. if ($this->display != 'edit' && $this->display != 'add') { 750. $this->initRegenerate(); 751. $this->initMoveImages(); 752. 753. $this->context->smarty->assign(array( 754. 'display_regenerate' => true, 755. 'display_move' => $this->display_move

AdminImagesControllerCore->initContent - [line 189 - classes/controller/Controller.php]

184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 185. $this->initHeader(); 186. } 187. 188. if ($this->viewAccess()) { 189. $this->initContent(); 190. } else { 191. $this->errors[] = Tools::displayError('Access denied.'); 192. } 193. 194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {

ControllerCore->run - [line 367 - classes/Dispatcher.php]

362. if (isset($params_hook_action_dispatcher)) { 363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher); 364. } 365. 366. // Running controller 367. $controller->run(); 368. } catch (PrestaShopException $e) { 369. $e->displayMessage(); 370. } 371. } 372.

DispatcherCore->dispatch - [line 58 - admin/index.php]

53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 55. } 56. 57. // Prepare and trigger admin dispatcher 58. Dispatcher::getInstance()->dispatch();

Edited by naturalba (see edit history)

Share this post


Link to post
Share on other sites

Hola.

Al  parecer la columna scenes de tu tabla ps_image_type no existe en la BD. Puede ser porque tu tabla no esta correctamente creada. La estructura de dicha tabla en PS 1.6 es la siguiente:

imagen.png.01da31a067958a6d4b74371458476cf8.png

Saludos

Share this post


Link to post
Share on other sites
9 minutes ago, Rolige said:

Hola.

Al  parecer la columna scenes de tu tabla ps_image_type no existe en la BD. Puede ser porque tu tabla no esta correctamente creada. La estructura de dicha tabla en PS 1.6 es la siguiente:

imagen.png.01da31a067958a6d4b74371458476cf8.png

Saludos

Gracias por tu respuesta. Sí que tengo esa columna, te dejo capturade pantalla de mi BD:

https://www.dropbox.com/s/hxp9y5gprlcd946/Captura%20de%20pantalla%202019-08-26%2022.17.25.png?dl=0

¿Se te ocurre otra cosa?

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More