Page 1 of 1

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

Posted: 29 Jun 2023, 21:52
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.

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

Posted: 02 Jul 2023, 14:57
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

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

Posted: 03 Jul 2023, 08:08
by sirkai
This is a migrated system J3->J4 as per migration instructions. Tried the Beta, no change.

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

Posted: 03 Jul 2023, 20:10
by Jan
Which migration instructions did you use? These: https://www.phoca.cz/documentation/86-j ... o-joomla-4 ?

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

Posted: 03 Jul 2023, 20:36
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.

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

Posted: 05 Jul 2023, 18:59
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

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

Posted: 06 Jul 2023, 07:53
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.

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

Posted: 06 Jul 2023, 11:11
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

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

Posted: 06 Jul 2023, 13:06
by sirkai
Done and fixed the issue. Thx.

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

Posted: 07 Jul 2023, 23:32
by Jan
Hi, great to hear it.

Jan