[BUG]: JCB Items "Checked Out" #1194
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Happened?
I noticed with my dev site I've been working on, and installed a fresh install of Joomla 5.1.1, installed JCB 5.0.3, and JCB rows in tables are checked out according to System --> Global Checkin. Even components that I create using JCB, and install, show as records as checked out as well.
Steps to reproduce the Bug
Install Joomla 5.x, install JCB 5.0.3, navigate to System --> Global Checkin. At last count there we 673 JCB items checked out, and are unable to check back in.
Which Joomla version are you compiling in?
5.2.2
Which PHP version are you compiling in?
8.2.21
Which Joomla versions are you targeting?
5.x
Which PHP version are you targeting?
8.2+
Which Web server is JCB running on?
Apache/2.4.59 (Debian)
Which Relational Database is JCB running on?
11.4.2-MariaDB-ubu2404
Which OS is JCB running on?
Ubuntu 22.04.4 LTS
Which JCB version are you using?
v5.0.3
Where in JCB did this issue occur?
Installation of a component, Installation JCB pkg
On which browsers did you encounter the issue?
Firefox
Additional Comments
Looking at Joomla tables, checked_out is set to NULL, default NULL. When an item is checked out, it looks like the item is checked out with the Joomla user ID from the user table. When the user closes (checks in) the item, the checked_out field reverts to NULL.
In JCB the checked_out field correctly checks out by the Joomla user, but when the item is checked in, the checked_out field does not revert to NULL, but instead reverts to 0.
Manually changing checked_out from 0 to null in the DB clears the "issue" and no longer shows the item as checked out.
[BUG]: JCB Fields "Checked Out"to [BUG]: JCB Items "Checked Out"Thanks for your detailed explanation of the issue—it’s very helpful in pinpointing the problem.
After reviewing the current JCB behavior and Joomla's conventions, I noticed that JCB sets the
checked_out
field to0
as the default and reverts to0
upon check-in. However, Joomla’s expected behavior is for thechecked_out
field to revert toNULL
when an item is checked in as you pointed out.I will add the fix to this in the next update, and then bump this issue again for testing 👍
JCB v5.0.4-beta2 has now been updated to fix this issue.
I tested on a fresh install and it works. However, it appears that if upgrading an existing install of JCB, example have JCB 5.0.3 installed, and install 5.0.4-beta2, you will have to go through each DB table, update the field default value to null, then run an sql query to update the value in each row.
If the tables were updated to default=NULL, then Joomla checkin could check everything in with the push of a button.
I am not sure what you mean whit this statement, since this is exactly what we did in 5.0.4-beta2.
Look here is the code:
In the base table.
Here we act on this setting in the schema base checker.
This means it should happen during update of the JCB component automatically, if not I will need some help from your side... I will need more debugging information. Since we do not get the same issue, and would need to understand why it does not happen on your side.
I just tested, by creating a new Joomla Container in Octojoom for J!5.2.3. I then installed JCB 5.0.3.
I checked the DB and checked_out in JCB fields was Null Yes, Default 0.
After that, I installed JCB 5.1.0-rc1, and after install those fields appear to be unchanged. I have checked several fields.
Can you give me the generated mysql and BaseTable.php (for Joomla 5)? here is what I get.. see install zip.
The more, if I check the table file that runs an update (checking the table schema) here is that file... see that basetable zip.
These are the only two file I know that effect the database during the installation and both these do not set the field default to
0