? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
5 Mar 2018

It's not possible to create a module in J4. An error is displayed:
Save failed with the following error: Field 'content' doesn't have a default value

I guess it is not required to have a content for the module, so we can remove it from the table structure.

@alikon can you help me out with the update script of postgres?

avatar laoneo laoneo - open - 5 Mar 2018
avatar laoneo laoneo - change - 5 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2018
Category SQL Administration com_admin Installation Postgresql
avatar wilsonge
wilsonge - comment - 5 Mar 2018

Looks good to me. Can you do some update files as well please - I want to start gearing up for a 3.9 alpha 1 where you can upgrade to 4.0

avatar laoneo laoneo - change - 6 Mar 2018
Labels Added: ?
avatar laoneo
laoneo - comment - 6 Mar 2018

There is an update file. Only the one for postgres is missing.

avatar alikon
alikon - comment - 6 Mar 2018

add in administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-03-05.sql
ALTER TABLE "#__modules" ALTER COLUMN "content" DROP NOT NULL;

but shouldn't work without #19707

p.s
unable to open pr on your branch

avatar laoneo
laoneo - comment - 7 Mar 2018

Thanks @alikon, added the script. Can you double check the changes in the joomla.sql of postgres? Are they ok?

avatar laoneo
laoneo - comment - 7 Mar 2018

I guess we are here fine.

avatar alikon
alikon - comment - 7 Mar 2018

#19707 apart yes

avatar Anu1601CS
Anu1601CS - comment - 7 Mar 2018

@laoneo its fine modules save success :)

avatar wilsonge
wilsonge - comment - 8 Mar 2018

You need to use Alter Column in the mysql change please otherwise the schema checker (https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Schema/ChangeItem/MysqlChangeItem.php) won't pick it up

avatar laoneo
laoneo - comment - 8 Mar 2018

There is no Alter Column or do I miss something here?

avatar wilsonge
wilsonge - comment - 8 Mar 2018

OK I'm just being dumb. We also have support for change https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Schema/ChangeItem/MysqlChangeItem.php#L168

But looks like currently it's only going to work for changing column types. Not for swapping things to not null. In fact the "kludge" for integer unsigned is going to trigger with TEXT NULL tho right? https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Schema/ChangeItem/MysqlChangeItem.php#L170-L176

avatar brianteeman
brianteeman - comment - 8 Apr 2018

Isnt this the same as #17752 ??

avatar laoneo
laoneo - comment - 8 Apr 2018

This one here is a subset of it and solves one purpose to fix creating modules. #17752 does more and needs carefully be tested as there should basically be a test case for every change in the install scripts which got changed. #17752 is also not finished as the update scripts are missing.

avatar laoneo
laoneo - comment - 8 May 2018

Where do we stay here? I think it would be not bad when we release the next alpha to be able to create modules.

avatar Quy
Quy - comment - 22 May 2018

But looks like currently it's only going to work for changing column types. Not for swapping things to not null. In fact the "kludge" for integer unsigned is going to trigger with TEXT NULL tho right?

After PR and database fix, the modules table stayed the same.
Tested with 5.5.5-10.1.29-MariaDB

avatar wilsonge wilsonge - change - 30 May 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-05-30 22:51:29
Closed_By wilsonge
avatar wilsonge wilsonge - close - 30 May 2018
avatar wilsonge wilsonge - merge - 30 May 2018

Add a Comment

Login with GitHub to post a comment