Post by nongetjie » Tue Oct 23, 2018 7:05 pm

Good afternoon,

Using excelport I migrated my product options from OC 1.5.6. to OC 3.0.2.0. The migration is succesful and I see all options.

But when I try to add an option value, or save the current option values all values get deleted. They are physically removed from the database. When I try to save the option values I get a blank page and after that the option values are gone.

Looking in the error log I see this:

Code: Select all

2018/10/23 12:46:14 [error] 1392#1392: *354 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Exception: Error: Duplicate entry '827-2' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO option_value_description SET option_value_id = '827', language_id = '2', option_id = '7', name = 'd134cm' in /vagrant/public/system/library/db/mysqli.php:40
But how can this be? Looks like Opencart is using an INSERT here, while in my opinion an UPDATE should be used (for the existing items). Is this happening because the options (and values) were imported and not inserted through the admin?

New member

Posts

Joined
Wed Nov 07, 2012 8:28 pm

Post by nongetjie » Tue Oct 23, 2018 8:08 pm

I did some investigating and found the following.

I got this error: Uncaught Exception: Error: Duplicate entry '769-2' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO option_value_description SET option_value_id = '769', language_id = '2', option_id = '15', name = '1.65' in /vagrant/public/system/library/db/mysqli.php:40

So I started looking in the database for option_value_id 769. It looks like that one is not even a part of the option that I am changing (15) but is connected to option 1 (see screenshots).

Now if I query for the name of the item I get more results, for 2 option_id's (1 and 15). So my conclusion would be that OC can't deal with two of the same option values in different options. In this case 1.65 is an option for 1 and 15.

Is that correct/a known issue?

Attachments

Screenshot 2018-10-23 at 13.58.33.png

Screenshot 2018-10-23 at 13.58.33.png (34.37 KiB) Viewed 260 times

Screenshot 2018-10-23 at 13.55.30.png

Screenshot 2018-10-23 at 13.55.30.png (14.36 KiB) Viewed 260 times


New member

Posts

Joined
Wed Nov 07, 2012 8:28 pm
Who is online

Users browsing this forum: No registered users and 416 guests