When I try to add a product everything goes fine until I save. Then I get a blank screen. If I then click on the link in the browser and push "enter" I will get the "add product" site back. The product is added at that time. I can't figure out what the problem is.
The error.log is empty. However, if I look in my server error.log then there is a lot of information but still I don't see where the problem exists.
Maybe somebody here can help me?
OC version 3.0.3.1_rc
The server says this:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Exception: Error: Duplicate entry '0' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO `oc_product_advertise_google` (`product_id`, `store_id`, `google_product_category`) SELECT p.product_id, p2s.store_id, (SELECT c2gpc.google_product_category FROM `oc_product_to_category` p2c LEFT JOIN `oc_category_path` cp ON (p2c.category_id = cp.category_id) LEFT JOIN `oc_category_to_google_product_category` c2gpc ON (c2gpc.category_id = cp.path_id AND c2gpc.store_id = 0) WHERE p2c.product_id = p.product_id AND c2gpc.google_product_category IS NOT NULL ORDER BY cp.level DESC LIMIT 0,1) as `google_product_category` FROM `oc_product` p LEFT JOIN `oc_product_to_store` p2s ON (p2s.product_id = p.product_id AND p2s.store_id = 0) LEFT JOIN `oc_product_advertise_google` pag ON (pag.product_id = p.product_id AND pag.store_id=p2s.store_id) WHERE pag.product_id IS NULL AND p2s.store_id IS NOT NULL AND p.product_id IN (86) in *removed because of privacy*, referer: *removed because of privacy*
It would be (very !!) good, if the people here would use the search before they post!
This bug is reported since 2 days https://github.com/opencart/opencart/issues/7133
and also posted here in this forum 2,3 times!
This bug is reported since 2 days https://github.com/opencart/opencart/issues/7133
and also posted here in this forum 2,3 times!
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Fixed the problem. Logged in to phpMyAdmin.
Remove: oc_product_advertise_google.
Go to -> SQL
Copy and paste the next lines:
DROP TABLE IF EXISTS `oc_product_advertise_google`;
CREATE TABLE `oc_product_advertise_google` (
`product_advertise_google_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`product_id` int(11) DEFAULT NULL,
`store_id` int(11) NOT NULL DEFAULT '0',
`has_issues` tinyint(1) DEFAULT NULL,
`destination_status` enum('pending','approved','disapproved') NOT NULL DEFAULT 'pending',
`impressions` int(11) NOT NULL DEFAULT '0',
`clicks` int(11) NOT NULL DEFAULT '0',
`conversions` int(11) NOT NULL DEFAULT '0',
`cost` decimal(15,4) NOT NULL DEFAULT '0.0000',
`conversion_value` decimal(15,4) NOT NULL DEFAULT '0.0000',
`google_product_category` varchar(10) DEFAULT NULL,
`condition` enum('new','refurbished','used') DEFAULT NULL,
`adult` tinyint(1) DEFAULT NULL,
`multipack` int(11) DEFAULT NULL,
`is_bundle` tinyint(1) DEFAULT NULL,
`age_group` enum('newborn','infant','toddler','kids','adult') DEFAULT NULL,
`color` int(11) DEFAULT NULL,
`gender` enum('male','female','unisex') DEFAULT NULL,
`size_type` enum('regular','petite','plus','big and tall','maternity') DEFAULT NULL,
`size_system` enum('AU','BR','CN','DE','EU','FR','IT','JP','MEX','UK','US') DEFAULT NULL,
`size` int(11) DEFAULT NULL,
`is_modified` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`product_advertise_google_id`),
UNIQUE KEY `product_id_store_id` (`product_id`,`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Start Query
Tested and works!
Remove: oc_product_advertise_google.
Go to -> SQL
Copy and paste the next lines:
DROP TABLE IF EXISTS `oc_product_advertise_google`;
CREATE TABLE `oc_product_advertise_google` (
`product_advertise_google_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`product_id` int(11) DEFAULT NULL,
`store_id` int(11) NOT NULL DEFAULT '0',
`has_issues` tinyint(1) DEFAULT NULL,
`destination_status` enum('pending','approved','disapproved') NOT NULL DEFAULT 'pending',
`impressions` int(11) NOT NULL DEFAULT '0',
`clicks` int(11) NOT NULL DEFAULT '0',
`conversions` int(11) NOT NULL DEFAULT '0',
`cost` decimal(15,4) NOT NULL DEFAULT '0.0000',
`conversion_value` decimal(15,4) NOT NULL DEFAULT '0.0000',
`google_product_category` varchar(10) DEFAULT NULL,
`condition` enum('new','refurbished','used') DEFAULT NULL,
`adult` tinyint(1) DEFAULT NULL,
`multipack` int(11) DEFAULT NULL,
`is_bundle` tinyint(1) DEFAULT NULL,
`age_group` enum('newborn','infant','toddler','kids','adult') DEFAULT NULL,
`color` int(11) DEFAULT NULL,
`gender` enum('male','female','unisex') DEFAULT NULL,
`size_type` enum('regular','petite','plus','big and tall','maternity') DEFAULT NULL,
`size_system` enum('AU','BR','CN','DE','EU','FR','IT','JP','MEX','UK','US') DEFAULT NULL,
`size` int(11) DEFAULT NULL,
`is_modified` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`product_advertise_google_id`),
UNIQUE KEY `product_id_store_id` (`product_id`,`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Start Query
Tested and works!
Thank you so much for this fix!! I started having similar problems when I added a new Product in Admin, even though the product added successfully. I'm very thankful I was able to find your thread pretty quickly in searching and the fix helped! Thank you!
EPS wrote: ↑Tue Jan 15, 2019 11:19 pmFixed the problem. Logged in to phpMyAdmin.
Remove: oc_product_advertise_google.
Go to -> SQL
Copy and paste the next lines:
DROP TABLE IF EXISTS `oc_product_advertise_google`;
CREATE TABLE `oc_product_advertise_google` (
`product_advertise_google_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`product_id` int(11) DEFAULT NULL,
`store_id` int(11) NOT NULL DEFAULT '0',
`has_issues` tinyint(1) DEFAULT NULL,
`destination_status` enum('pending','approved','disapproved') NOT NULL DEFAULT 'pending',
`impressions` int(11) NOT NULL DEFAULT '0',
`clicks` int(11) NOT NULL DEFAULT '0',
`conversions` int(11) NOT NULL DEFAULT '0',
`cost` decimal(15,4) NOT NULL DEFAULT '0.0000',
`conversion_value` decimal(15,4) NOT NULL DEFAULT '0.0000',
`google_product_category` varchar(10) DEFAULT NULL,
`condition` enum('new','refurbished','used') DEFAULT NULL,
`adult` tinyint(1) DEFAULT NULL,
`multipack` int(11) DEFAULT NULL,
`is_bundle` tinyint(1) DEFAULT NULL,
`age_group` enum('newborn','infant','toddler','kids','adult') DEFAULT NULL,
`color` int(11) DEFAULT NULL,
`gender` enum('male','female','unisex') DEFAULT NULL,
`size_type` enum('regular','petite','plus','big and tall','maternity') DEFAULT NULL,
`size_system` enum('AU','BR','CN','DE','EU','FR','IT','JP','MEX','UK','US') DEFAULT NULL,
`size` int(11) DEFAULT NULL,
`is_modified` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`product_advertise_google_id`),
UNIQUE KEY `product_id_store_id` (`product_id`,`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Start Query
Tested and works!
Worked for me thank you!!
Who is online
Users browsing this forum: JessiesBoutique, pprmkr and 499 guests