jfd Posted August 29, 2017 Share Posted August 29, 2017 (edited) Hello, I have deleted one test order from order list via free module "Delete Orders" in my Prestashop 1.6.1.4. When I now I'm entering my shop and want to enter any product in my shop, I get an error: Table 'database.ps_product_comment' doesn't exist SELECT (SUM(pc.`grade`) / COUNT(pc.`grade`)) AS avg, MIN(pc.`grade`) AS min, MAX(pc.`grade`) AS max, COUNT(pc.`grade`) AS review FROM `ps_product_comment` pc WHERE pc.`id_product` = 1 AND pc.`deleted` = 0 LIMIT 1 at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$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] DbCore->query - [line 690 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 20 - override/classes/Product.php] - [1 Arguments] Product::getRatings - [line 91 - tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code] - [1 Arguments] Warning: file(/home/users/public_html/mysite.com/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code) [function.file]: failed to open stream: No such file or directory in /home/users/public_html/mysite.com/classes/exception/PrestaShopException.php on line 103 Warning: array_slice() expects parameter 1 to be array, boolean given in /home/users/public_html/mysite.com/classes/exception/PrestaShopException.php on line 110 content_59a58f32a00b49_08391216 - [line 188 - tools/smarty/sysplugins/smarty_internal_templatebase.php] - [1 Arguments] Can anyone explain why this error occurs and how can I fix it ? Thank you for your help, Chris Edited August 29, 2017 by jfd (see edit history) 1 Link to comment Share on other sites More sharing options...
Scully Posted August 29, 2017 Share Posted August 29, 2017 Deleting an order with the module you mentionned has nothing to do with your error message. You have mixed up something else. Your error complains about a missing table for product comments. Table 'database.ps_product_comment' doesn't exist Have you installed the module product comments? If yes - try to uninstall the module and check if your error is gone. Link to comment Share on other sites More sharing options...
prestahero.com Posted August 30, 2017 Share Posted August 30, 2017 Hello, I have deleted one test order from order list via free module "Delete Orders" in my Prestashop 1.6.1.4. When I now I'm entering my shop and want to enter any product in my shop, I get an error: Table 'database.ps_product_comment' doesn't exist SELECT (SUM(pc.`grade`) / COUNT(pc.`grade`)) AS avg, MIN(pc.`grade`) AS min, MAX(pc.`grade`) AS max, COUNT(pc.`grade`) AS review FROM `ps_product_comment` pc WHERE pc.`id_product` = 1 AND pc.`deleted` = 0 LIMIT 1 at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$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] DbCore->query - [line 690 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 20 - override/classes/Product.php] - [1 Arguments] Product::getRatings - [line 91 - tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code] - [1 Arguments] Warning: file(/home/users/public_html/mysite.com/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code) [function.file]: failed to open stream: No such file or directory in /home/users/public_html/mysite.com/classes/exception/PrestaShopException.php on line 103 Warning: array_slice() expects parameter 1 to be array, boolean given in /home/users/public_html/mysite.com/classes/exception/PrestaShopException.php on line 110 content_59a58f32a00b49_08391216 - [line 188 - tools/smarty/sysplugins/smarty_internal_templatebase.php] - [1 Arguments] Can anyone explain why this error occurs and how can I fix it ? Thank you for your help, Chris I think you have somehow uninstalled the product comments module. Try to go to the module list and install it. If you see it's already installed, try to reset the module (because may be the table has been deleted although the module is still installed and enabled) Link to comment Share on other sites More sharing options...
vekia Posted August 30, 2017 Share Posted August 30, 2017 i agree, it does not look like it is a matter of delete orders module. it looks like there is no comments table in your shop database. moreover - i see that you use override of Product class - it tries to run this function: Product::getRatings (this is not default prestashop function). this means that comments module is required for this override Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now