1048 Column 'checked_out' cannot be null

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
DorsetJoomla
Joomla! Explorer
Joomla! Explorer
Posts: 254
Joined: Thu Jan 24, 2008 12:20 pm

1048 Column 'checked_out' cannot be null

Post by DorsetJoomla » Sat Jun 10, 2023 9:46 am

I have just migrated a site to Joomla 4.3.2 and whenever I go to make changes to an article and save it I get the message 1048 Column 'checked_out' cannot be null The site seems to work but this is annoying. Any suggestions? Database structures report as OK Thanks
You do not have the required permissions to view the files attached to this post.

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24974
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: 1048 Column 'checked_out' cannot be null

Post by pe7er » Sat Jun 10, 2023 10:52 am

That erros is caused because Joomla tries to save the article with "checked_out" as null.
While your database table structure has that field defined as default value "NOT NULL".

The current J4 has that field defined as
"`checked_out_time` datetime NULL DEFAULT NULL,"
see in the block where #__content is defined, currently line 174: https://github.com/joomla/joomla-cms/bl ... nsions.sql

Use phpMyAdmin to change that field as "default NULL" (as precaution, create a backup of your database before doing so)
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

DorsetJoomla
Joomla! Explorer
Joomla! Explorer
Posts: 254
Joined: Thu Jan 24, 2008 12:20 pm

Re: 1048 Column 'checked_out' cannot be null

Post by DorsetJoomla » Sun Jun 11, 2023 8:10 am

Thanks for your reply. I have got into the database but not sure what I am looking for to make the change you suggest.
Thanks Dennis


nehabhushan94
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Jun 11, 2023 8:56 am

Re: 1048 Column 'checked_out' cannot be null

Post by nehabhushan94 » Sun Jun 11, 2023 9:10 am

@pe7er it seems that the field _is_ nullable, in which case, it might not be the fix for OPs question..

or am I reading this wrong?

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24974
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: 1048 Column 'checked_out' cannot be null

Post by pe7er » Sun Jun 11, 2023 9:56 am

nehabhushan94 wrote:
Sun Jun 11, 2023 9:10 am
@pe7er it seems that the field _is_ nullable, in which case, it might not be the fix for OPs question..
Yes, you are right. In Joomla 4 that field is nullable indeed.
In Joomla 3.10 that field was "NOT NULL", see line 366 in https://github.com/joomla/joomla-cms/bl ... joomla.sql

Code: Select all

`checked_out` int unsigned NOT NULL DEFAULT 0,
When a site has been migrated from 3.x to 4.x and something went wrong during the migration, that field might still be "NOT NULL". Which can cause the issue mentioned by the topic starter.
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com


Post Reply

Return to “General Questions/New to Joomla! 4.x”