-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Globalcheckin task plugin error #44727
Labels
Comments
the nature of that field is to allow NULL value, so declaring NOT NULL is wrong imho |
We use default NULL in the core, but extension developers could declare NOT NULL. @ghicar would you like to make a PR as you already have a solution? Then maintainers can decide. |
ghicar
added a commit
to ghicar/joomla-cms
that referenced
this issue
Jan 21, 2025
This edit, allows the globalcheckin plugin task to work with 3rd party plugins that use "NOT NULL" in the checkout_out column. The previous code only half catered for this case and resulted in -2 error code when run. Note the behaviour of the scheduled globalcheckin task is inconsistent with a global checkin done from the admin control panel which works ok with "nut null". See joomla#44727
Closed as there is a PR #44762 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce the issue
Expected result
The "item" is checked in by the scheduled task.
Actual result
The task returns error code -2, resulting in task failure email if configured to send emails on failure.
System information (as much as possible)
Joomla 5.3.2
MySQL 8.0.36
GlobalCheckin plugin 5.0.0
PHP 8.3.15
Additional comments
The globalcheckin plugin (version 5.0.0) does not cater properly for tables with "NULL not allowed" in the checked_out column. The code ~/plugins/task/globalcheckin/src/Extension/GlobalCheckin.php caters for both "not NULL" and null allowed in the WHERE clause but tries to set the checked_out column field value to NULL when expired checked out rows are found irrespective of NULL being allowed or not.
Changing the code:
to:
Fixes the problem
The text was updated successfully, but these errors were encountered: