Post by vitali@avalia.no » Tue Dec 12, 2023 5:31 pm

Hi

PHP v 8.3.0, MySQL 5.7, IIS10
I am trying to upgdrade and it stops at step 3 with this error:
SyntaxError: Unexpected token '<', "<b>Error: "... is not valid JSON
parsererror
<b>Error: Invalid use of NULL value<br/>Error No: 1138<br/>ALTER TABLE `oc_api` MODIFY `date_added` datetime NOT NULL AFTER `status`</b>: in <b>C:\inetpub\wwwroot\mystore\system\library\db\mysqli.php</b> on line <b>76</b>

How can I solve it?


Posts

Joined
Thu Nov 10, 2016 7:59 pm

Post by JNeuhoff » Tue Dec 12, 2023 6:07 pm

OpenCart 4 doesn't allow zero dates. The upgrade function will fail is most cases, especially also for your extensions.

It's better to do a fresh install of OpenCart 4, including all of your extensions. For the latter, check that they actually support OpenCart 4. You can then use the free Export/Import tool to copy your data over to your new OpenCart, see also our FAQ for this.

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


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vitali@avalia.no » Tue Dec 12, 2023 6:26 pm

Thanks. I will try that. I did not see any zero dates in table, so I was not sure why I got that error.
I assume I will have to copy all the product images manually.


Posts

Joined
Thu Nov 10, 2016 7:59 pm

Post by xxvirusxx » Wed Dec 13, 2023 4:21 am

Better don't upgrade yet to 4.x.x.x

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Wed Dec 13, 2023 10:55 pm

vitali@avalia.no wrote:
Tue Dec 12, 2023 5:31 pm
Hi

PHP v 8.3.0, MySQL 5.7, IIS10
I am trying to upgdrade and it stops at step 3 with this error:
SyntaxError: Unexpected token '<', "<b>Error: "... is not valid JSON
parsererror
<b>Error: Invalid use of NULL value<br/>Error No: 1138<br/>ALTER TABLE `oc_api` MODIFY `date_added` datetime NOT NULL AFTER `status`</b>: in <b>C:\inetpub\wwwroot\mystore\system\library\db\mysqli.php</b> on line <b>76</b>

How can I solve it?
I was also wondering a bit about strict DB rules with IIS even though the dates no longer requires 0 by default.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 3 guests