When I try to save this nested subform, the entries are saved but still I get the error:
Save failed with the following error: Field 'value' doesn't have a default value
If I disable the nested subform no error appears.
no error
The currently installed Joomla! version is "5.2.0-rc1-dev" 5.2.0-rc1-dev
Labels |
Added:
No Code Attached Yet
|
Maybe because I updated the site with an update package ? No clean installation...
Not sure how to debug.
are you sure the problem isnt from the first field where you have not selected an item?
Yes because if I leave the "grid" fields empty the error does not appear and because in my first testing site no other fields exist.
I encountered the same error, but resolved it by changing my database column from non-nullable to nullable, which made the error disappear. I'm not sure if this is related to your issue, but it might be worth checking your database for the stored value
Ok but thats a fresh install of 5.1.4 + Update to RC1, not sure sending the users to the database is a good user experience. Maybe this set to Nullable could be implemented in the update?
It should be NULL by default
I confirm it was NULL
So it is nothing to do with that then
Agree, but the error is there anyway.
Updated to RC1 and issue still exist
From the information provided I could not replicate the error
Maybe if you provided more details on the exact setup of the fields someone will be able to help you. As it is right now, based on the limited information in your screenshots I still cannot replicate this.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-10-04 08:49:19 |
Closed_By | ⇒ | coolcat-creations |
It seems it was an issue with the nightly build package,
I installed again a new 5.1.4 made an update to 5.2 RC1 and the issue did not appear anymore.
now I installed again a new 5.1.4 made an update by uploading the folder into the joomla update component to make sure I did the same like in the failed ones and the issue did not appear. Closing.
Status | Closed | ⇒ | New |
Closed_Date | 2024-10-04 08:49:19 | ⇒ | |
Closed_By | coolcat-creations | ⇒ |
I have to reopen this again because I have the same Error on a fresh install of Joomla 5.2
The error message refers to a value not being given for a database column with name "value" in an "INSERT" SQL statement and that database column does not have a DEFAULT value in the database structure so the value HAS to be specified when inserting data.
It's very likely the "value" column of the "#__fields_values" table, and for that column we do not specify a default value by purpose here: https://github.com/joomla/joomla-cms/blob/5.2-dev/installation/sql/mysql/supports.sql#L226
The reason why we do not specify a default value is because that is not allowed on MySQL 8, see here: https://dev.mysql.com/doc/refman/8.4/en/blob.html
BLOB and TEXT columns cannot have DEFAULT values.
The "TEXT" refers to data types "TINYTEXT", "TEXT", "MEDIUMTEXT", and "LONGTEXT", so for CHAR or VARCHAR columns we still can use DEFAULT values.
See also PR #27937 which removed the DEFAULT values from such column so Joomla works on MySQL 8-
Even if you could change the database to have a DEFAULT value for such a column when you are on MariaDB, we cannot do that because we do not have different data structures for MySQL and MariaDB.
So the database is as it should be, and the error must be in some PHP code which does the "INSERT" into that table without specifying a value for that column (even NULL would be ok as value).
@Fedik As you know much about our subforms: Do you have an idea where that could go wrong? Maybe something with a TABLE class removing all columns from the insert statement when it has a NULL value? Could that be related to what you handle with your PR #43905 ?
Closing again since its an issue with jfilters.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-11-06 10:21:50 |
Closed_By | ⇒ | coolcat-creations |
From the information provided I could not replicate the error