[BUG]: JCB Items "Checked Out" #1194

Open
opened 2024-12-04 00:57:31 +00:00 by mwweb · 2 comments

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.

### 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.
mwweb added the
Bug
label 2024-12-04 00:57:31 +00:00
mwweb changed title from [BUG]: JCB Fields "Checked Out" to [BUG]: JCB Items "Checked Out" 2024-12-04 00:57:49 +00:00
Owner

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 to 0 as the default and reverts to 0 upon check-in. However, Joomla’s expected behavior is for the checked_out field to revert to NULL 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 👍

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 to `0` as the default and reverts to `0` upon check-in. However, Joomla’s expected behavior is for the `checked_out` field to revert to `NULL` 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 👍
Owner

JCB v5.0.4-beta2 has now been updated to fix this issue.

JCB [v5.0.4-beta2](https://git.vdm.dev/joomla/pkg-component-builder/archive/v5.0.4-beta2.zip) has now been updated to fix this issue.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1194
No description provided.