Joomla 4 - Column 'checked_out' cannot be null

Need help installing Joomla! 4.x? For all Joomla! 4.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
chupi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Apr 25, 2013 10:45 pm

Joomla 4 - Column 'checked_out' cannot be null

Post by chupi » Sun Aug 29, 2021 6:15 pm

Whenever there is a major change in a Joomla! I tremble. I've been working with Joomla! Since version 1.0.0 more than 15 years ago, I have migrated from 1.0.0 to 1.5, from 1.5 to 3.0 (from 1.5 to 2.5 I gave up) and every time, every time, it has been an absolute disaster :'( .

How could it be less, with Joomla 4 the same thing happens, a disaster!

I have been trying to update a Joomla 3.10.1 site (on a clear test site) for a week with the template and third party components and I have not been able to do it (I even got the famous red screen of death).

As a last resort I have done a clean installation (without any third party component) of Joomla 3.10.1 and then I have updated to Joomla 4. After correcting some errors that the database gave me, when trying to save an article I get this error :

An error has occurred.
1048 Column 'checked_out' cannot be null


What's going on? Joomla 4 not even working after a clean installation of Joomla 3.10.1?

I beg someone to tell me a solution so as not to jump from the top of a bridge ...

Thanks

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28323
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by Per Yngve Berg » Sun Aug 29, 2021 7:11 pm

I have checked Column 'checked_out' in the Content table.

J3.10.1: The coulmn have Allow NULL=No and Default=Zero
J4 upgraded: Same as 3.10.1
Clean J4 install: Allow NULL=yes and Default=NULL

The upgrade should deliver the same database schema as the new install.

chupi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Apr 25, 2013 10:45 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by chupi » Mon Aug 30, 2021 7:48 am

Thanks Per for your answer, but I don't exactly understand your explanation.

The database tables should already be updated to Joomla 4 (I have done a clean update from Joomla 3.10.1).

I attach an image of the _content table where it shows that the checked_out column has the value 0 and the checked_out_time column has the value NULL

Should this be like this?
error-checked_out.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28323
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by Per Yngve Berg » Mon Aug 30, 2021 11:40 am

Wrong tab. Go to the Structure Tab. Set column to allow null.

chupi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Apr 25, 2013 10:45 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by chupi » Mon Aug 30, 2021 5:26 pm

Thanks Per, fixed according to your indications. Articles can now be modified and saved.

I am attaching the complete structure of the table _content. Do you see any other errors that I should correct?

Thanks for your help,
You do not have the required permissions to view the files attached to this post.

northbra
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Thu Apr 16, 2015 4:52 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by northbra » Thu Oct 07, 2021 10:24 am

To Change to null, do I go into table structure and place tick in the null box?

chupi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Apr 25, 2013 10:45 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by chupi » Thu Oct 07, 2021 10:59 am

In this article I explain how I corrected the error: https://www.xn--apaados-6za.es/72465-co ... rte-i.html

northbra
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Thu Apr 16, 2015 4:52 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by northbra » Thu Oct 07, 2021 11:41 am

Chupi, tried as in artice, but get error 1067 invalid default value for created?

chupi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Apr 25, 2013 10:45 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by chupi » Thu Oct 07, 2021 12:13 pm

northbra wrote:
Thu Oct 07, 2021 11:41 am
Chupi, tried as in artice, but get error 1067 invalid default value for created?
I don't know why you get that error, in my case that method worked fine.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28323
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by Per Yngve Berg » Thu Oct 07, 2021 3:36 pm

Change the default value to NULL. You probably have to zero, which is not a valid date. Zero dates are not accepted from mysql version 5.7.

northbra
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Thu Apr 16, 2015 4:52 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by northbra » Thu Oct 07, 2021 4:17 pm

Per,
I am still getting the error messsage 1067 invalid default value for created

chupi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Apr 25, 2013 10:45 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by chupi » Thu Oct 07, 2021 5:53 pm

Have you tried Maintenance -> Database -> Update Structure?

northbra
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Thu Apr 16, 2015 4:52 pm

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by northbra » Thu Oct 07, 2021 6:07 pm

Yes tried that, no difference

User avatar
DV-admin
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Wed Sep 20, 2017 7:24 am
Location: Genova
Contact:

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by DV-admin » Tue Oct 26, 2021 5:04 pm

Do you have a lot of articles?
I had something like this when I updated to Joomla! 4.
I spent quite a bit of time going down my list of articles because one of them was creating this error.
I solved it by trial and error really.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11245
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Joomla 4 - Column 'checked_out' cannot be null

Post by sozzled » Tue Oct 26, 2021 7:50 pm

Per Yngve Berg wrote:
Thu Oct 07, 2021 3:36 pm
Change the default value to NULL. You probably have to zero, which is not a valid date. Zero dates are not accepted from mysql version 5.7.
Huh? checked_out is a number; it is not a date. checked_out cannot be NULL; it must be a number like 0 or 1. checked_out_date is a date; the date can be NULL.

created is date; it must be a valid date. Zero dates are not allowed. It does not make much sense to allow a NULL date for when an article was created. This column is populated when you create a new article; it cannot be changed within J! but you can change it within the database. It's possible, though, that _contents table may have been corrupted or not properly modified during some data migration (e.g. updating an older website or importing the articles from another website) but I would be guessing.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)


Post Reply

Return to “Installation Joomla! 4.x”