Creating Order Status: Field 'date' doesn't have a default value

Phoca Cart - complex e-commerce extension
sirkai
Phoca Member
Phoca Member
Posts: 35
Joined: 15 Nov 2015, 11:25

Creating Order Status: Field 'date' doesn't have a default value

Post by sirkai »

Hi
When I want to create a new Order Status, I receive the error when I try to save:
Save failed with the following error: Field 'date' doesn't have a default value
I cannot even find a date field within an order status forms. Any idea J4.3.2, PhocaCart 4.0.7
Thank you.

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by Jan »

Hi, did you migrate Phoca Cart from J3 or is this default J4 install?

Do you get the same problem when you try to test it with latest Beta?
https://github.com/PhocaCz/PhocaCart/re ... 8Beta6.zip
If you find Phoca extensions useful, please support the project
sirkai
Phoca Member
Phoca Member
Posts: 35
Joined: 15 Nov 2015, 11:25

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by sirkai »

This is a migrated system J3->J4 as per migration instructions. Tried the Beta, no change.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by Jan »

Which migration instructions did you use? These: https://www.phoca.cz/documentation/86-j ... o-joomla-4 ?
If you find Phoca extensions useful, please support the project
sirkai
Phoca Member
Phoca Member
Posts: 35
Joined: 15 Nov 2015, 11:25

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by sirkai »

yes, thats the link. Used whatever was there when I migrated some time ago. Noticed the error message just now.
Also everything else from the setup on J3 in the categories came over. Already had some custom ones created initially.
That's why I knew that I migrated that table.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by Jan »

Hi, in such case, you need to check the database column manually and set the structure for this column to "No" (Null) and "None" for Default:

Image

:idea:

Jan
If you find Phoca extensions useful, please support the project
sirkai
Phoca Member
Phoca Member
Posts: 35
Joined: 15 Nov 2015, 11:25

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by sirkai »

From your description and screenshot it is unclear to what "this column" actually is. My layout in phpmyadmin looks very different and I want to avoid guessing which columns you talk about.Thx.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by Jan »

Hi, try to run this query:

Code: Select all

ALTER TABLE `jos_phocacart_order_statuses` CHANGE `date` `date` DATETIME NULL;
- change jos_ to your prefix

Jan
If you find Phoca extensions useful, please support the project
sirkai
Phoca Member
Phoca Member
Posts: 35
Joined: 15 Nov 2015, 11:25

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by sirkai »

Done and fixed the issue. Thx.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Creating Order Status: Field 'date' doesn't have a default value

Post by Jan »

Hi, great to hear it.

Jan
If you find Phoca extensions useful, please support the project
Post Reply