Post by EPS » Thu Jan 10, 2019 11:46 pm

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*
Last edited by EPS on Tue Jan 15, 2019 11:20 pm, edited 1 time in total.

EPS
Newbie

Posts

Joined
Thu Jan 10, 2019 11:03 pm

Post by OSWorX » Fri Jan 11, 2019 1:10 am

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!

Forum Rules [en]: viewtopic.php?f=176&t=200480
Commercial Request: viewforum.php?f=88
Dedicated Support: https://dedicated.opencart.com/
Marketplace Support: https://www.opencart.com/index.php?rout ... rt/support
Documentation: http://docs.opencart.com/en-gb/extension/theme/

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by EPS » Fri Jan 11, 2019 2:09 am

I’ve Googled for three days, searched this forum and no results. I can do anything except add a new product without problems. The Github site you gave has also no solution. So please give me a link to the solution if there is any.

EPS
Newbie

Posts

Joined
Thu Jan 10, 2019 11:03 pm

Post by EPS » Tue Jan 15, 2019 11:19 pm

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!

EPS
Newbie

Posts

Joined
Thu Jan 10, 2019 11:03 pm

Post by M@MH » Sat Jan 26, 2019 1:30 am

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!

Newbie

Posts

Joined
Sat Jan 26, 2019 1:15 am

Post by blocks1 » Sun Mar 03, 2019 1:20 am

EPS wrote:
Tue Jan 15, 2019 11:19 pm
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!

Worked for me thank you!!

New member

Posts

Joined
Thu Feb 08, 2018 11:14 am

Post by amcomsuk » Wed Jun 05, 2019 1:39 am

You can just delete the row in that table and adding products with no problem :)

Newbie

Posts

Joined
Wed Jun 05, 2019 1:37 am

Post by EPS » Wed Jun 05, 2019 5:35 am

amcomsuk wrote:
Wed Jun 05, 2019 1:39 am
You can just delete the row in that table and adding products with no problem :)
Did that the first time but the next day the problem is back. With above solution the problem stays away

EPS
Newbie

Posts

Joined
Thu Jan 10, 2019 11:03 pm
Who is online

Users browsing this forum: No registered users and 17 guests