Maybe, but how many of the users using OC are NO amateurs??Qphoria wrote:It's just amateur to to blindly update your live site with a bleeding edge version for no reason.ebmarques wrote:The same with me.
My store is down, my Website is down.
I am so mad with OpenCart!!! Amateurs!!! It is unacceptable to release a new version without testing!!!
In spite of hiring someone to fix it I will move to WordPress with an Ecommerce plugin.
BYE BYE OpenCart!!!
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
The update model does not work properly, so before upgrade edit "upgrade.php" in the model directory and change the line number 25 from
to
OR
change the line number 125 from
to
After upgrade check your store settings becouse maybe you will lost the content of the home page and some data like user API key and some other data.
Code: Select all
$line = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . DB_PREFIX, $line);
Code: Select all
$line = str_replace("CREATE TABLE `oc_", "CREATE TABLE IF NOT EXISTS `" . DB_PREFIX, $line);
change the line number 125 from
Code: Select all
preg_match_all('#create\s*table\s*if\s*not\s*exists\s*`(\w[\w\d]*)`#i', $sql, $table);
Code: Select all
preg_match_all('#create\s*table\s*`(\w[\w\d]*)`#i', $sql, $table);
"bleeding edge version" !!!!!!!!!!!!!!!!!!OSWorX wrote:Maybe, but how many of the users using OC are NO amateurs??Qphoria wrote:It's just amateur to to blindly update your live site with a bleeding edge version for no reason.ebmarques wrote:The same with me.
My store is down, my Website is down.
I am so mad with OpenCart!!! Amateurs!!! It is unacceptable to release a new version without testing!!!
In spite of hiring someone to fix it I will move to WordPress with an Ecommerce plugin.
BYE BYE OpenCart!!!
"for no reason" !!!!!!!!!
Qphoria, you made my day! Thank you very much! Now I have no doubt! OC is history to me.
So is there any solution to create api ? probably deleted due to upgrades
I just copy api data from opencart.sql to SQL query and it works for me
I just copy api data from opencart.sql to SQL query and it works for me
Code: Select all
-- Table structure for table `oc_api`
--
DROP TABLE IF EXISTS `oc_api`;
CREATE TABLE `oc_api` (
`api_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`key` text NOT NULL,
`status` tinyint(1) NOT NULL,
`date_added` datetime NOT NULL,
`date_modified` datetime NOT NULL,
PRIMARY KEY (`api_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `oc_api_ip`
--
DROP TABLE IF EXISTS `oc_api_ip`;
CREATE TABLE `oc_api_ip` (
`api_ip_id` int(11) NOT NULL AUTO_INCREMENT,
`api_id` int(11) NOT NULL,
`ip` varchar(40) NOT NULL,
PRIMARY KEY (`api_ip_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `oc_api_session`
--
DROP TABLE IF EXISTS `oc_api_session`;
CREATE TABLE `oc_api_session` (
`api_session_id` int(11) NOT NULL AUTO_INCREMENT,
`api_id` int(11) NOT NULL,
`token` varchar(32) NOT NULL,
`session_id` varchar(32) NOT NULL,
`session_name` varchar(32) NOT NULL,
`ip` varchar(40) NOT NULL,
`date_added` datetime NOT NULL,
`date_modified` datetime NOT NULL,
PRIMARY KEY (`api_session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Hmm still got problem when go to Admin Order Page
Warning: Your IP XX.XX.XX.XX is not allowed to access this API!
Can add but always coming back this warning
Updated
Api User haven't selected in settings that's why i always receiving this warning.
Go to Home> Stores> Settings
and Pick API User
Warning: Your IP XX.XX.XX.XX is not allowed to access this API!
Can add but always coming back this warning
Updated
Api User haven't selected in settings that's why i always receiving this warning.
Go to Home> Stores> Settings
and Pick API User
Code: Select all
Warning: mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50542 Library:50626 in /home/abilrkprivat/public_html/system/library/db/mysqli.php on line 7
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /home/abilrkprivat/public_html/system/library/db/mysqli.php:7) in /home/abilrkprivat/public_html/system/library/response.php on line 12
Does this work or so it upgrades the database. How about the other things like admin and so on?AhmedSabri wrote:The update model does not work properly, so before upgrade edit "upgrade.php" in the model directory and change the line number 25 fromtoCode: Select all
$line = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . DB_PREFIX, $line);
ORCode: Select all
$line = str_replace("CREATE TABLE `oc_", "CREATE TABLE IF NOT EXISTS `" . DB_PREFIX, $line);
change the line number 125 fromtoCode: Select all
preg_match_all('#create\s*table\s*if\s*not\s*exists\s*`(\w[\w\d]*)`#i', $sql, $table);
After upgrade check your store settings becouse maybe you will lost the content of the home page and some data like user API key and some other data.Code: Select all
preg_match_all('#create\s*table\s*`(\w[\w\d]*)`#i', $sql, $table);
Had some errors myself when upgrading from 2.0.3.1 to 2.1.0.1
Admin Dashboard Page:
Warning: vsprintf(): Too few arguments in activity.php on line 19Warning: vsprintf(): Too few arguments in activity.php on line 19Warning: vsprintf(): ..................
Admin Settings Page:
Notice: Error: Unknown column 'name' in 'order clause'
Error No: 1054
SELECT * FROM `oc_api` ORDER BY name ASC in .....system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in ...admin/model/user/api.php on line 77
See errors in front end as well:
Notice: Error: Table 'Commad4quadcom.oc_cart' doesn't exist
Error No: 1146
DELETE FROM oc_cart WHERE customer_id = '0' AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR) in system/library/db/mysqli.php on line 41Notice: Error: Table 'Commad4quadcom.oc_cart' doesn't exist
Error No: 1146
SELECT * FROM oc_cart WHERE customer_id = '0' AND session_id = '90r7445d1mdov0svrrobdv1aj4' in system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in system/library/cart.php on line 37Notice: Error: Table 'Commad4quadcom.oc_cart' doesn't exist
Error No: 1146.....................
Luckily backed up so going back to previous version.
Hope the update gets checked and fixed real soon !
Admin Dashboard Page:
Warning: vsprintf(): Too few arguments in activity.php on line 19Warning: vsprintf(): Too few arguments in activity.php on line 19Warning: vsprintf(): ..................
Admin Settings Page:
Notice: Error: Unknown column 'name' in 'order clause'
Error No: 1054
SELECT * FROM `oc_api` ORDER BY name ASC in .....system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in ...admin/model/user/api.php on line 77
See errors in front end as well:
Notice: Error: Table 'Commad4quadcom.oc_cart' doesn't exist
Error No: 1146
DELETE FROM oc_cart WHERE customer_id = '0' AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR) in system/library/db/mysqli.php on line 41Notice: Error: Table 'Commad4quadcom.oc_cart' doesn't exist
Error No: 1146
SELECT * FROM oc_cart WHERE customer_id = '0' AND session_id = '90r7445d1mdov0svrrobdv1aj4' in system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in system/library/cart.php on line 37Notice: Error: Table 'Commad4quadcom.oc_cart' doesn't exist
Error No: 1146.....................
Luckily backed up so going back to previous version.
Hope the update gets checked and fixed real soon !
The latest UPDATE, as you call it, (I call them releases) does not need a fix, for some reasons, apparently, some DB-Stuff got changed, for good, compared with it's predecessor Subversions. This is, what may happen, frequently, on most Software-DEV-Versions. Just remember MS Windows, requiring decades, and a lot of changes, to make it do, what had been planned.
Just to mention it!
Ernie
Just to mention it!
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
To sum up the major items on this thread that I also received, and now fixed: (The question is, why do we have to perform these steps? A whole table missing, c'mon!)
This code fixes the error about the oc_cart missing. Note that you need to remove 'oc_' if you do not use the prefix:
For this error:
I basically renamed the 'username' field to 'name' in the 'oc_api' table, as the api.php file is using 'name' in the array...and taking a hint from this post:
https://github.com/opencart/opencart/issues/3507
All seems to work for now.
This code fixes the error about the oc_cart missing. Note that you need to remove 'oc_' if you do not use the prefix:
Code: Select all
CREATE TABLE `oc_cart` (
`cart_id` int(11) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) NOT NULL,
`session_id` varchar(32) NOT NULL,
`product_id` int(11) NOT NULL,
`recurring_id` int(11) NOT NULL,
`option` text NOT NULL,
`quantity` int(5) NOT NULL,
`date_added` datetime NOT NULL,
PRIMARY KEY (`cart_id`),
KEY `cart_id` (`customer_id`,`session_id`,`product_id`,`recurring_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Code: Select all
Notice: Error: Unknown column 'name' in 'order clause'
Error No: 1054
https://github.com/opencart/opencart/issues/3507
All seems to work for now.
damn """"""""
i nailed it , to all of you fellaz who have been keeping quiet a bout this ,
i will help most of u who have had toruble like me , i have had to delete all my system files just for one small number to be changed. okay to hell with the excitement ??
go to cpanel ,
databases .... > phpmyadminn......>
look for your data base name, on the left corner,
click it , below look for oc_api_ip click it
you will see this picture. check and see if your ip is the same with this one, if not then this is the problem.
click edit on the right , add only change that ip , after press go. an you are done.
took me 4 days to figure this out . iam happy to share with you all. oc 2.1.0
i nailed it , to all of you fellaz who have been keeping quiet a bout this ,
i will help most of u who have had toruble like me , i have had to delete all my system files just for one small number to be changed. okay to hell with the excitement ??
go to cpanel ,
databases .... > phpmyadminn......>
look for your data base name, on the left corner,
click it , below look for oc_api_ip click it
you will see this picture. check and see if your ip is the same with this one, if not then this is the problem.
click edit on the right , add only change that ip , after press go. an you are done.
took me 4 days to figure this out . iam happy to share with you all. oc 2.1.0
Attachments
damn.png (67.34 KiB) Viewed 14490 times
another post to help solve this error,
go to system, settings, click on your store edit action, go to the option bar,
scroll down down until u find stock,
by api user select your created profile, go up and save , and there it will be solved.
i had to recreate my site over 8 times and 4 days work.
ha ha haa hope this post helps
go to system, settings, click on your store edit action, go to the option bar,
scroll down down until u find stock,
by api user select your created profile, go up and save , and there it will be solved.
i had to recreate my site over 8 times and 4 days work.
ha ha haa hope this post helps
This solve everything on my store to the upgrade from 2.0.3 up to 2.1.0.2 Thanks!!
This should work .. hope so hehe
and after that to avoid the vs... error as one of the guys here posted you need to empty the table oc_customer_activityCREATE TABLE `oc_cart` (
`cart_id` int(11) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) NOT NULL,
`session_id` varchar(32) NOT NULL,
`product_id` int(11) NOT NULL,
`recurring_id` int(11) NOT NULL,
`option` text NOT NULL,
`quantity` int(5) NOT NULL,
`date_added` datetime NOT NULL,
PRIMARY KEY (`cart_id`),
KEY `cart_id` (`customer_id`,`session_id`,`product_id`,`recurring_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Code: Select all
TRUNCATE TABLE oc_customer_activity;
This should work .. hope so hehe
starconfig wrote:So is there any solution to create api ? probably deleted due to upgrades
I just copy api data from opencart.sql to SQL query and it works for me
Code: Select all
-- Table structure for table `oc_api` -- DROP TABLE IF EXISTS `oc_api`; CREATE TABLE `oc_api` ( `api_id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL, `key` text NOT NULL, `status` tinyint(1) NOT NULL, `date_added` datetime NOT NULL, `date_modified` datetime NOT NULL, PRIMARY KEY (`api_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; -- -------------------------------------------------------- -- -- Table structure for table `oc_api_ip` -- DROP TABLE IF EXISTS `oc_api_ip`; CREATE TABLE `oc_api_ip` ( `api_ip_id` int(11) NOT NULL AUTO_INCREMENT, `api_id` int(11) NOT NULL, `ip` varchar(40) NOT NULL, PRIMARY KEY (`api_ip_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; -- -------------------------------------------------------- -- -- Table structure for table `oc_api_session` -- DROP TABLE IF EXISTS `oc_api_session`; CREATE TABLE `oc_api_session` ( `api_session_id` int(11) NOT NULL AUTO_INCREMENT, `api_id` int(11) NOT NULL, `token` varchar(32) NOT NULL, `session_id` varchar(32) NOT NULL, `session_name` varchar(32) NOT NULL, `ip` varchar(40) NOT NULL, `date_added` datetime NOT NULL, `date_modified` datetime NOT NULL, PRIMARY KEY (`api_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Flawless Victory!!! I just changed the ENGINE= InnoDB
Thanks your are a legend!
Thanks for finding this solution.
should be used during either the installation or during the upgrade activity in order to avoid this type of problem in the future.
Code: Select all
SHOW TABLE STATUS
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hello Friends,
I have installed fresh opencart 3.0.0 on my local machine macbook pro. It was working fine. But last 2 days I am receiving following error.
Fatal error: Uncaught Exception: Error: Table 'streamit.oc_cart' doesn't exist<br />Error No: 1146<br />DELETE FROM oc_cart WHERE (api_id > '0' OR customer_id = '0') AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR) in /Applications/MAMP/htdocs/streamit/system/library/db/mysqli.php:40 Stack trace: #0 /Applications/MAMP/htdocs/streamit/system/library/db.php(16): DB\MySQLi->query('DELETE FROM oc_...', Array) #1 /Applications/MAMP/htdocs/streamit/system/library/cart/cart.php(15): DB->query('DELETE FROM oc_...') #2 /Applications/MAMP/htdocs/streamit/catalog/controller/startup/startup.php(183): Cart\Cart->__construct(Object(Registry)) #3 /Applications/MAMP/htdocs/streamit/system/engine/action.php(51): ControllerStartupStartup->index() #4 /Applications/MAMP/htdocs/streamit/system/engine/router.php(34): Action->execute(Object(Registry)) #5 /Applications/MAMP/htdocs/streamit/system/engine/router.php(19): Router->execute(Object(Action)) #6 /Applications/MAMP/htdocs/streamit/system/framework.php(168): Router->dispatch(Object(Action in /Applications/MAMP/htdocs/streamit/system/library/db/mysqli.php on line 40
============================
Can anybody help me out what is the issue.
Thanks
Jafar Ansari
I have installed fresh opencart 3.0.0 on my local machine macbook pro. It was working fine. But last 2 days I am receiving following error.
Fatal error: Uncaught Exception: Error: Table 'streamit.oc_cart' doesn't exist<br />Error No: 1146<br />DELETE FROM oc_cart WHERE (api_id > '0' OR customer_id = '0') AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR) in /Applications/MAMP/htdocs/streamit/system/library/db/mysqli.php:40 Stack trace: #0 /Applications/MAMP/htdocs/streamit/system/library/db.php(16): DB\MySQLi->query('DELETE FROM oc_...', Array) #1 /Applications/MAMP/htdocs/streamit/system/library/cart/cart.php(15): DB->query('DELETE FROM oc_...') #2 /Applications/MAMP/htdocs/streamit/catalog/controller/startup/startup.php(183): Cart\Cart->__construct(Object(Registry)) #3 /Applications/MAMP/htdocs/streamit/system/engine/action.php(51): ControllerStartupStartup->index() #4 /Applications/MAMP/htdocs/streamit/system/engine/router.php(34): Action->execute(Object(Registry)) #5 /Applications/MAMP/htdocs/streamit/system/engine/router.php(19): Router->execute(Object(Action)) #6 /Applications/MAMP/htdocs/streamit/system/framework.php(168): Router->dispatch(Object(Action in /Applications/MAMP/htdocs/streamit/system/library/db/mysqli.php on line 40
============================
Can anybody help me out what is the issue.
Thanks
Jafar Ansari
Who is online
Users browsing this forum: Google [Bot] and 57 guests