J4 Issue ?
avatar JanKrohn-Khalibre
JanKrohn-Khalibre
7 Mar 2017

Steps to reproduce the issue

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

Screenshot attachedscreen shot 2017-03-07 at 10 54 40

Expected result

New footer module added

Actual result

Error
Save failed with the following error: Field 'content' doesn't have a default value

System information (as much as possible)

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

Additional comments

Fresh installation, not updated

avatar JanKrohn-Khalibre JanKrohn-Khalibre - open - 7 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Mar 2017
avatar C-Lodder
C-Lodder - comment - 8 Mar 2017

@yvesh @laoneo any ideas on this?

avatar zero-24
zero-24 - comment - 8 Mar 2017

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.

avatar laoneo
laoneo - comment - 8 Mar 2017

I got similar errors when discovering extensions in Joomla. Should the default value not being defined in the table schema?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Mar 2017

Can't confirm:
bildschirmfoto 2017-03-09 um 09 48 17

System information (as much as possible)

Joomla! 4.0.0-dev
macOS Sierra, 10.12.3
Firefox 52.0 (64-bit)
PHP 7.0.15

MAMP 4.1.1

  • PHP 7.0.15
  • MySQLi 5.6.35
avatar joomdonation
joomdonation - comment - 11 Mar 2017

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

avatar JanKrohn-Khalibre
JanKrohn-Khalibre - comment - 11 Mar 2017

Interesting... In my db the content field has no default value.

image

I've certainly not tampered with the db after the initial installation.

avatar C-Lodder
C-Lodder - comment - 19 Apr 2017

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.

avatar franz-wohlkoenig franz-wohlkoenig - change - 9 May 2017
Status New Discussion
avatar ciar4n
ciar4n - comment - 15 Jul 2017

I can confirm this.

Only on modules discovered. Same modules save fine if installed via installer.

avatar csthomas
csthomas - comment - 30 Nov 2017

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.

avatar C-Lodder
C-Lodder - comment - 6 Dec 2017

This doesn't appear to be an issue anymore. Saving a new module or discovering one both work.

@franz-wohlkoenig

avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Dec 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-12-06 13:23:20
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 6 Dec 2017
Closed_Date 2017-12-06 13:23:20 2017-12-06 13:23:21
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 6 Dec 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 6 Dec 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Dec 2017

closed as stated above.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14401.

avatar ciar4n
ciar4n - comment - 13 Dec 2017

I'm still getting this issue with discovered modules

avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Dec 2017
Status Closed New
Closed_Date 2017-12-06 13:23:21
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - change - 13 Dec 2017
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 13 Dec 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 13 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Dec 2017
Status New Discussion
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Dec 2017

reopened as stated above.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14401.

avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar brianteeman
brianteeman - comment - 25 Mar 2018

I cannot replicate this on new or discovered modules

@ciar4n It seems to be only you. Maybe it is an issue with the module. I am going to close this for now but if you still have an issue can you please re-open it and share the module

avatar brianteeman brianteeman - change - 25 Mar 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-03-25 12:02:04
Closed_By brianteeman
Labels Added: J4 Issue
avatar brianteeman brianteeman - close - 25 Mar 2018
avatar laoneo
laoneo - comment - 25 Mar 2018

Does this pr help #19836 ?

avatar ymages
ymages - comment - 18 May 2018

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 '';


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14401.

Add a Comment

Login with GitHub to post a comment