Joomla 4 - Column 'checked_out' cannot be null

Need help upgrading your Joomla! website or converting to Joomla! 4.x?

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: 19
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
Last edited by toivo on Wed Jan 12, 2022 8:25 pm, edited 1 time in total.
Reason: mod note: moved from 4.x Installation

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 29278
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: 19
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: 29278
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: 19
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: 19
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: 19
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: 29278
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: 19
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! Enthusiast
Joomla! Enthusiast
Posts: 129
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: 12631
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?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

User avatar
Gasoline
Joomla! Explorer
Joomla! Explorer
Posts: 432
Joined: Tue Aug 23, 2005 10:33 am
Location: NL

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

Post by Gasoline » Wed Jan 12, 2022 4:44 pm

I have the same issue, must be something from the last Joomla 4 update. Very annoying.
Using Joomla since 2005.

jooomlaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Nov 30, 2016 6:31 am

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

Post by jooomlaa » Mon Jan 24, 2022 12:32 pm

I have this problem too. the checked_out field is not 0 or 1 but should contain the user ID that is currently editing the post. 0: the post is not checked out. Number greater than 0, the post is checked out by the user with this ID.
I've only had this error since a recent update from Joomla 4.0.x to 4.0.4 or 4.0.5. In the database, this column is NULL everywhere.

jooomlaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Nov 30, 2016 6:31 am

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

Post by jooomlaa » Mon Jan 24, 2022 12:34 pm

I am currently using version 4.0.6 in this project and the error persists. This error cannot be fixed using the Joomla database repair tools.

User avatar
trogladyte
Joomla! Explorer
Joomla! Explorer
Posts: 495
Joined: Sat May 03, 2008 9:27 pm
Location: Phoenix, AZ
Contact:

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

Post by trogladyte » Mon Apr 18, 2022 10:52 pm

This is crazy. I did a MySQL dump of xxxxx_content, updated with the new prefix and imported. Import succeeded and there are my articles.

However, I now have this error. Following the great article by chupi (thanks for taking the time to do that) unfortunately didn't work. Regardless of what field I edit in "Change Structure" I get the same error every time. Given that I have several sites with hundreds of articles I don't really want to rebuild entirely by copying and pasting.

I don't understand why this is happening. When I look in the table, there are valid dates for "created", "modified", "publish_up". Only "publish_down" has all zeros. However, if I try to alter that to anything, I get the #1067 - Invalid default value for 'created' again.

Surely someone has figured this out?
Ian Shere - Phoenix Website Design & Hosting
http://www.citruskiwi.com
Certified Flight Instructor http://www.flygoodyear.com

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

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

Post by sozzled » Mon Apr 18, 2022 11:10 pm

trogladyte wrote:
Mon Apr 18, 2022 10:52 pm
I don't understand why this is happening. When I look in the table, there are valid dates for "created", "modified", "publish_up". Only "publish_down" has all zeros. However, if I try to alter that to anything, I get the #1067 - Invalid default value for 'created' again.
The subject of this forum topic is "Joomla 4 - Column 'checked_out' cannot be null".

I thought this was a discussion about the column checked_out? My earlier observations were about that column. created must contain a valid date; NULL is not allowed and None is the default value.

If you want to discuss how to set a value in your _contents table for rows that contain invalid values for created (or modified or publish_up), I suggest that you start your own forum topic for this. This topic is about the column checked_out ... at least that's what I thought it was about. :pop
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

User avatar
ceford
Joomla! Ace
Joomla! Ace
Posts: 1129
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

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

Post by ceford » Tue Apr 19, 2022 7:47 am

trogladyte wrote:
Mon Apr 18, 2022 10:52 pm
Only "publish_down" has all zeros. However, if I try to alter that to anything, I get the #1067 - Invalid default value for 'created' again.
Older versions of MySQL accepted 0000-00-00 as a valid date. No longer so. If you have such dates try changing them (all) to NULL if allowed or 1971-01-01 if not. Make a back up of your table first!

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 29278
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 » Tue Apr 19, 2022 8:43 am

The change was in MySQL 5.7


Post Reply

Return to “Migrating and Upgrading to Joomla! 4.x”