Page 1 of 1

Error 1146 after update

Posted: Wed Aug 14, 2013 4:47 pm
by kriti_kostas
I update the e-shop from version 1.5.4 to 1.5.6
after that I get an error
Notice: Error: Table 'xxx.product_filter' doesn't exist
Error No: 1146
SELECT * FROM product_filter WHERE product_id = '2403' in /var/www/vhosts/arte-shop.gr/httpdocs/system/database/mysql.php on line 50

Only when I edit a product. If I only insert new product I can do it without any problem
I this is a missing table but I dont know how can I fix it.
Does anyone have a solution?
Thank you very much
Kostas

Re: Error 1146 after update

Posted: Wed Aug 14, 2013 7:15 pm
by florinsith
Seems like you didnt run the upgrade script or maybe it failed, try rerunning it if the upgrade script allows you by going to yoursite.com/install

Re: Error 1146 after update

Posted: Fri Aug 16, 2013 4:31 pm
by kriti_kostas
It doesnt let me to rerun it and the problem still exist? It would be usefull if I do a downgrade and upagrade again?

Re: Error 1146 after update

Posted: Fri Aug 16, 2013 7:04 pm
by kriti_kostas
I fix it.

Re: Error 1146 after update

Posted: Sun Aug 18, 2013 2:28 pm
by ninjatrack
Hello. I'm having the exact same issue as you with "Error No: 1146." Can you tell me how you resolved this? I'm tempted to de-install and then re-install but I don't want to loose my previous work done before the upgrade. Thanks in advance for your help!!!

Re: Error 1146 after update

Posted: Mon Aug 19, 2013 9:53 pm
by kriti_kostas
I found another e-shop that I have made with version 1.5.5.1 and I create the table (product_filter) that I have problem exactly the same and worked without doing anything more special. I hope this will help you.

Re: Error 1146 after update

Posted: Fri Aug 30, 2013 10:46 am
by fourfeetandfeathersf
kriti_kostas wrote:I fix it.

Do you think you could fix it for me also? I am having the same problem on my products page and on my categories page. I also have a script error showing up on my store front top right hand corner of window. I have written several people to get help....I really need help and would appreciate your response. Thanks!

Re: Error 1146 after update

Posted: Fri Aug 30, 2013 3:07 pm
by kriti_kostas
Hello,
I answered you on your private message.
Thank you

Re: Error 1146 after update

Posted: Thu Jul 17, 2014 10:55 pm
by mai
Hi, I get also error no 1146 after an update:Notice: Error: Table 'marijnisgolf.category_path' doesn't exist
Error No: 1146
SELECT COUNT(DISTINCT p.product_id) AS total FROM category_path cp LEFT JOIN product_to_category p2c ON (cp.category_id = p2c.category_id) LEFT JOIN product p ON (p2c.product_id = p.product_id) LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '2' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND cp.path_id = '60' in E:\HostingSpaces\Marijnis1\golfersweb.nl\wwwroot\system\database\mysql.php on line 50

I can access my admin site, but the store is 'gone'
Please help me, I am trying to solve this already for a week now. Getting pretty desperate.

Re: Error 1146 after update

Posted: Fri Jul 18, 2014 4:28 pm
by florinsith
Try ading the table yourself then, in phpmyadmin select the database of your store and in the sql tab run the query:

Code: Select all

CREATE TABLE `category_path` (
  `category_id` int(11) NOT NULL,
  `path_id` int(11) NOT NULL,
  `level` int(11) NOT NULL,
  PRIMARY KEY (`category_id`,`path_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

Re: Error 1146 after update

Posted: Fri Jul 18, 2014 5:46 pm
by mai
Thanks, this is working, but now I get the same error for the product.

Notice: Error: Table 'marijnisgolf.product_profile' doesn't exist
Error No: 1146
SELECT `pd`.* FROM `product_profile` `pp` JOIN `profile_description` `pd` ON `pd`.`language_id` = 2 AND `pd`.`profile_id` = `pp`.`profile_id` JOIN `profile` `p` ON `p`.`profile_id` = `pd`.`profile_id` WHERE `product_id` = 268 AND `status` = 1 AND `customer_group_id` = 1 ORDER BY `sort_order` ASC in E:\HostingSpaces\Marijnis1\golfersweb.nl\wwwroot\system\database\mysql.php on line 50

Do you have a SQL-query for the product path or can I change "category into product"?

Re: Error 1146 after update

Posted: Fri Jul 18, 2014 6:38 pm
by straightlight
WHERE `product_id` = 268 AND `status` = 1 AND `customer_group_id` = 1 ORDER BY `sort_order` ASC
does not contain any table prefixes compared with the inner joins. Each fields needs to be compared with tables in this case.

Re: Error 1146 after update

Posted: Sat Jul 19, 2014 2:21 am
by mai
Thanks for the comment, but I have no clue what to do now. Can you be a bit more specific in order for me to solve the problem.

Re: Error 1146 after update

Posted: Sat Jul 19, 2014 7:14 am
by straightlight
In catalog/model/catalog/product.php file,

replace:

Code: Select all

return $this->db->query("SELECT `pd`.* FROM `" . DB_PREFIX . "product_profile` `pp` JOIN `" . DB_PREFIX . "profile_description` `pd` ON `pd`.`language_id` = " . (int)$this->config->get('config_language_id') . " AND `pd`.`profile_id` = `pp`.`profile_id` JOIN `" . DB_PREFIX . "profile` `p` ON `p`.`profile_id` = `pd`.`profile_id` WHERE `product_id` = " . (int)$product_id . " AND `status` = 1 AND `customer_group_id` = " . (int)$customer_group_id . " ORDER BY `sort_order` ASC")->rows;
with:

Code: Select all

return $this->db->query("SELECT `pd`.* FROM `" . DB_PREFIX . "product_profile` `pp` JOIN `" . DB_PREFIX . "profile_description` `pd` ON `pd`.`language_id` = " . (int)$this->config->get('config_language_id') . " AND `pd`.`profile_id` = `pp`.`profile_id` JOIN `" . DB_PREFIX . "profile` `p` ON `p`.`profile_id` = `pd`.`profile_id` WHERE `pp`.`product_id` = " . (int)$product_id . " AND `p`.`status` = 1 AND `pd`.`customer_group_id` = " . (int)$customer_group_id . " ORDER BY `p`.`sort_order` ASC")->rows;

Re: Error 1146 after update

Posted: Sun Jul 20, 2014 6:38 pm
by mai
Thanks for the help, but now I get an other error:
Notice: Error: Table 'marijnisgolf.product_profile' doesn't exist
Error No: 1146
SELECT `pd`.* FROM `product_profile` `pp` JOIN `profile_description` `pd` ON `pd`.`language_id` = 2 AND `pd`.`profile_id` = `pp`.`profile_id` JOIN `profile` `p` ON `p`.`profile_id` = `pd`.`profile_id` WHERE `pp`.`product_id` = 279 AND `p`.`status` = 1 AND `pd`.`customer_group_id` = 1 ORDER BY `p`.`sort_order` ASC in E:\HostingSpaces\Marijnis1\golfersweb.nl\wwwroot\system\database\mysql.php on line 50

Somehow something went terrible wrong with updating Opencart to latest version. It would be appreciated if there is a solution to this problem.

Re: Error 1146 after update

Posted: Sun Jul 20, 2014 7:22 pm
by mai
Help, my webshop is completely messed up after updating. In the admin side I get the following errror.

Warning: mysql_query(): Unable to save result set in E:\HostingSpaces\Marijnis1\golfersweb.nl\wwwroot\system\database\mysql.php on line 22Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, (SELECT keyword FROM url_alias WHERE query = 'product_id=192') AS keyword FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '192' AND pd.language_id = '2' in E:\HostingSpaces\Marijnis1\golfersweb.nl\wwwroot\system\database\mysql.php on line 50

I can not get to the products. help, help, help!

Re: Error 1146 after update

Posted: Wed Aug 13, 2014 10:36 pm
by straightlight
If the profile table does not exist, then it means your last upgrade process has failed to complete. Restore backup and try the upgrade again. If issue persists, it means that your browser loads too many data at the time and the processed time period has been exceeded by your server.

Re: Error 1146 after update

Posted: Sun Jun 21, 2015 10:20 am
by Niksmart
Error 1146 table

I am getting a error on my opencart website..! Like this " Notice: Error: Table 'niksm74m_opencart.od_' doesn't exist
Error No: 1146
SELECT * FROM od_`order` WHERE order_id='3' in /home/niksm74m/public_html/system/database/mysql.php on line 50 " i am completed with my whole website and now i am getting a error like this.. Please help me .!!! I have read many post..! I know youll are the best ..! Heance i have approached you all with my problem ..! Please help me with this problem with procedure how to do it.. I am using opencart v1.5.6 .! Help me at your earliest