Testing on the 4.0.0-dev nightly branch.
New module: footer (can be replicated on other modules as well, but not all of them)
Title: Footer
Position: footer
New footer module added
Error
Save failed with the following error: Field 'content' doesn't have a default value
PHP Built On Linux server.heidoc.net 2.6.32-042stab112.15 #1 SMP Tue Oct 20 17:22:56 MSK 2015 x86_64
Database Version 5.5.5-10.1.21-MariaDB
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.1.2
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 4.0.0-dev dev [ Amani ] 8-February-2017 14:11 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Fresh installation, not updated
It should be about this line: https://github.com/joomla/joomla-cms/blob/staging/installation/sql/mysql/joomla.sql#L1474 as there is no value for content
in that module and the strict mode of mysql fires here. I would expect that we need to set a default value for the content
field on the save method.
I got similar errors when discovering extensions in Joomla. Should the default value not being defined in the table schema?
Could not re-procedure the issue. The error message indicate that the content field of #__modules doesn't have default value. However, looking at this https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/sql/mysql/joomla.sql#L1472 , I see that the content field has default value already, so this issue should not happen
The footer module has been removed in J4 in favour of using a custom module instead. I've tested this on some other modules and cannot replicate it anymore.
If anyone else is still able to replicate, can they share which module they tested it with, else this can be closed.
Status | New | ⇒ | Discussion |
I can confirm this.
Only on modules discovered. Same modules save fine if installed via installer.
In mysql "BLOB/TEXT" column can't have a default value, except NULL:).
https://stackoverflow.com/questions/3466872/why-cant-a-text-column-have-a-default-value-in-mysql
Default value does not work.
The solution is to add empty string in php code or allow column to be NULL.
This doesn't appear to be an issue anymore. Saving a new module or discovering one both work.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-06 13:23:20 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2017-12-06 13:23:20 | ⇒ | 2017-12-06 13:23:21 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/14401
closed as stated above.
I'm still getting this issue with discovered modules
Status | Closed | ⇒ | New |
Closed_Date | 2017-12-06 13:23:21 | ⇒ | |
Closed_By | joomla-cms-bot | ⇒ |
Closed_Date | 0000-00-00 00:00:00 | ⇒ |
Set to "open" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/14401
Status | New | ⇒ | Discussion |
reopened as stated above.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-03-25 12:02:04 |
Closed_By | ⇒ | brianteeman | |
Labels |
Added:
J4 Issue
|
J4 alpha 3 I solved this in a simple way
ALTER TABLE #__modules
CHANGE content
content
TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';
@yvesh @laoneo any ideas on this?