-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.2] Error on saving nested Subform #44168
Comments
From the information provided I could not replicate the error |
Maybe because I updated the site with an update package ? No clean installation... |
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 |
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. |
It seems it was an issue with the nightly build package, |
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
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. |
Steps to reproduce the issue
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
![grafik](https://private-user-images.githubusercontent.com/828371/372086083-c7133275-f323-4570-b37d-9b430ccf2265.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjIwNzksIm5iZiI6MTczODk2MTc3OSwicGF0aCI6Ii84MjgzNzEvMzcyMDg2MDgzLWM3MTMzMjc1LWYzMjMtNDU3MC1iMzdkLTliNDMwY2NmMjI2NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QyMDU2MTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01Mjg2ZDE4MTEyZGZmYzJjMWIxNThmZjM4ZmM0NWY2NDBmNzU1NDU1MTA1NTdmMDI4NzY5OTgxYzZjOTU0NzIxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.97S0F1WDsxG8hmzyAlZAjcw9IpvTOt2m4nlPpp_QOJE)
If I disable the nested subform no error appears.
Expected result
no error
System information (as much as possible)
The currently installed Joomla! version is "5.2.0-rc1-dev" 5.2.0-rc1-dev
The text was updated successfully, but these errors were encountered: