Post by p419 » Fri Jan 27, 2023 3:54 am

Hello All,

We've setup our OC 3.0.3.1 site locally using Wampserver on Windows 10, we're attempting to upgrade to version 3.0.3.8 Maintenance Branch. When we run the install/upgrade script it generates the following error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data OK Warning: mysqli::query(): (HY000/3776): Cannot change table's storage engine because the table participates in a foreign key constraint. in C:\wamp64\www\home\pfm1967\public_html\system\library\db\mysqli.php on line 25{"error":"Error Code(0): Error: Cannot change table's storage engine because the table participates in a foreign key constraint.
Error No: 3776
ALTER TABLE `ocfe_product` ENGINE = `MyISAM` in C:\\wamp64\\www\\home\\pfm1967\\public_html\\system\\library\\db\\mysqli.php on line 49"}

Can anyone point me in a direction that resolves this error?

Any help is appreciated.

Regards,

Paul


New member

Posts

Joined
Tue Nov 27, 2018 2:01 am
Location - Toronto

Post by ADD Creative » Fri Jan 27, 2023 8:43 pm

Looks like a database table that has been added or modified, possibly by an extension. If you can work out which extension you could then contact the developer.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Fri Jan 27, 2023 9:51 pm

Both OpenCart 3.0.3.1 and 3.0.x.x_Maintenance use the 'MyISAM' engine. It looks like you have a 3rd party extension which must have changed it.

In any case, don't use OpenCart's built-in upgrade, it usually fails, especially with 3rd party extensions. It's easier to do a fresh install of your OpenCart site, then add all extensions, one by one. Finally copy your data via the Export/Import tool (see our FAQ), or via PHPMyAdmin.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by p419 » Fri Jan 27, 2023 10:23 pm

ADD Creative wrote:
Fri Jan 27, 2023 8:43 pm
Looks like a database table that has been added or modified, possibly by an extension. If you can work out which extension you could then contact the developer.
Hi ADD Creative,

Thanks for the reply.
It looks like there's 4 extensions involved in the product table so that could be challenging but I'll see what I can do. I also have a real mix of InnoDB and MyISAM in my database which I assume could be another issue.

Regards,

Paul


New member

Posts

Joined
Tue Nov 27, 2018 2:01 am
Location - Toronto

Post by p419 » Fri Jan 27, 2023 10:48 pm

JNeuhoff wrote:
Fri Jan 27, 2023 9:51 pm
Both OpenCart 3.0.3.1 and 3.0.x.x_Maintenance use the 'MyISAM' engine. It looks like you have a 3rd party extension which must have changed it.

In any case, don't use OpenCart's built-in upgrade, it usually fails, especially with 3rd party extensions. It's easier to do a fresh install of your OpenCart site, then add all extensions, one by one. Finally copy your data via the Export/Import tool (see our FAQ), or via PHPMyAdmin.
Hi JNeuhoff,

Thanks for the response.

We now have a mix of InnoDB and MyISAM in the database which I assume will also cause problems. I believe I changed the DB to InnoDB because it was a faster choice. I'm not sure why I have a mix of the two now.

Do I really need to build the site from a clean install? Geez, I thought going from 3.0.3.1 to 3.0.3.8 would be considered a minor upgrade, building from a clean install doesn't feel minor! It makes me wonder if I should wait for Open Cart 4 and the extensions to be production ready.

Regards,

Paul


New member

Posts

Joined
Tue Nov 27, 2018 2:01 am
Location - Toronto

Post by JNeuhoff » Fri Jan 27, 2023 11:10 pm

I think even for your fresh install you could use the same existing database.

I am currently upgrading sites myself from 3.0.3.2 to 3.0.x.x_Maintenance so will have some more experience on this soon.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by p419 » Fri Jan 27, 2023 11:59 pm

JNeuhoff wrote:
Fri Jan 27, 2023 11:10 pm
I think even for your fresh install you could use the same existing database.

I am currently upgrading sites myself from 3.0.3.2 to 3.0.x.x_Maintenance so will have some more experience on this soon.
Using the same database would certainly help, I'll give that a try.

Are you thinking OC4 is too far away from being production ready?

Regards,

Paul


New member

Posts

Joined
Tue Nov 27, 2018 2:01 am
Location - Toronto

Post by JNeuhoff » Sat Jan 28, 2023 12:59 am

Yes, I think OpenCart 4 will still take some time to become stable enough for live sites.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: georgefeichter and 46 guests