Skip to content

[5.4] Checkin with default value in task#46694

Merged
richard67 merged 4 commits intojoomla:5.4-devfrom
Digital-Peak:task/checkin
Feb 4, 2026
Merged

[5.4] Checkin with default value in task#46694
richard67 merged 4 commits intojoomla:5.4-devfrom
Digital-Peak:task/checkin

Conversation

@laoneo
Copy link
Copy Markdown
Member

@laoneo laoneo commented Jan 15, 2026

Summary of Changes

The global checkin action, resets the checked_out column with the default value, but the "Checking" task sets it to null. If a 3rd party extension doesn't accept null and uses a default value of 0 instead. The task exits with a -2 exit code. This pr resets the checked_out column the same way in the plugin as the core does in the model, when doing a global checkin.

Testing Instructions

  • Install DPCalendar free
  • Create an event
  • Close the browser tab
  • Create a checkin task
  • Run that task manually

Actual result BEFORE applying this Pull Request

It returns with exit code -2.

Expected result AFTER applying this Pull Request

All items are checked in.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@laoneo laoneo added the bug label Jan 15, 2026
@sidd19898
Copy link
Copy Markdown

I tested this on a local Joomla 5.4-dev setup (PHP 8.x, MySQL, XAMPP).

I installed DPCalendar Lite via Install from Web and created a Global Check-in scheduled task using the default values.

Result:

The task completed successfully on 5.4-dev (before applying the PR).

After applying this PR, the task still completed successfully.

No errors or regressions were observed.

This indicates that DPCalendar Lite correctly accepts null values and therefore does not reproduce the edge case described in the PR.

Testing with a third-party extension that does not accept null values (and instead enforces a default like 0) would be required to reproduce the original issue, if such an extension is known.

@richard67
Copy link
Copy Markdown
Member

@laoneo What happens if the column does not have a default value (which is absolutely possible)? Can we be sure that neither MySQL nor MariaDB nor PostgreSQL throw an error in that case?

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Jan 15, 2026

It happens the same as with the global checkin code, which exists since ages. If it works there it will also work here. This pr does make sure that it is the same behavior and doesn't break extensions.

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Jan 16, 2026

@sidd19898 did you create an event also and closed the browser window before you run the task?

@sidd19898
Copy link
Copy Markdown

Hi @laoneo — thanks for the clarification.

In my earlier test, I created the DPCalendar event but did not explicitly close the browser tab before running the Global Check-in task, which likely explains why I could not reproduce the issue.

I’ll re-run the test following your exact steps (create event → close browser → run check-in task) and report back with the results.

@sidd19898
Copy link
Copy Markdown

I tested this PR on a local Joomla 5.4-dev setup (PHP 8.x, MySQL, XAMPP).

Steps followed:

Installed DPCalendar Lite

Created an event

Opened the event and closed the browser tab without saving

Created and manually ran the Global Check-in scheduled task

Result:
The task completed successfully both before and after applying this PR.

This suggests that DPCalendar Lite correctly accepts NULL values for the checked_out column, so the edge case described in the PR could not be reproduced with this extension.

Testing with another third-party extension that enforces a default value of 0 instead of NULL would be needed to fully validate the bug scenario.

@webgras
Copy link
Copy Markdown
Contributor

webgras commented Jan 16, 2026

I checked with DP Calender Core:
Without the patch, I get an error code "-2". but success shows in the window:
grafik

With the patch, error code 5 "no content was returned"
grafik
grafik

Then I checked with another extension (SP Pagebuilder).
Without the patch, I get an error code "-2". but success shows in the window.
grafik

grafik

With the patch, I get an error code "5": "no content was returned"

grafik

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Jan 27, 2026

Put error reporting to maximum and try again. Do you see an error message in the XHR request in the developer console?

@laoneo laoneo added the PBF Pizza, Bugs and Fun label Jan 27, 2026
@crimle
Copy link
Copy Markdown

crimle commented Jan 30, 2026

I have tested this item ✅ successfully on d90c478


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46694.

2 similar comments
@ChrisHoefliger
Copy link
Copy Markdown

I have tested this item ✅ successfully on d90c478


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46694.

@rbuelund
Copy link
Copy Markdown

I have tested this item ✅ successfully on d90c478


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46694.

@alikon alikon removed the PBF Pizza, Bugs and Fun label Jan 31, 2026
@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jan 31, 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46694.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 31, 2026
@richard67
Copy link
Copy Markdown
Member

@crimle @ChrisHoefliger @rbuelund Which database(s) (type and version) have you used for testing?

@rbuelund
Copy link
Copy Markdown

rbuelund commented Feb 1, 2026

We used: 10.5.29-MariaDB

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Feb 1, 2026

i'm unable to install DPCalendar free on pgsql

image

@richard67 richard67 added the RMDQ ReleaseManagerDecisionQueue label Feb 1, 2026
@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Feb 1, 2026

It doesn't support it. You need to look for an extension who does.

1 similar comment
@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Feb 1, 2026

It doesn't support it. You need to look for an extension who does.

@crimle
Copy link
Copy Markdown

crimle commented Feb 2, 2026

@crimle @ChrisHoefliger @rbuelund Which database(s) (type and version) have you used for testing?
MySQLi 11.4.9-MariaDB

@richard67
Copy link
Copy Markdown
Member

Pity. Would be really good to have a test with PostgreSQL (and also with MySQL 8 as it seems it has been tested only with MariaDB).

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented Feb 4, 2026

As stated in the description, this code runs since ages in the model already. This pr just hormonizes it and fixes a bug.

@richard67 richard67 removed the RMDQ ReleaseManagerDecisionQueue label Feb 4, 2026
@richard67
Copy link
Copy Markdown
Member

@laoneo Could you trigger a branch update? As you know, we don't have that button for your PRs.

@richard67 richard67 added this to the Joomla! 5.4.3 milestone Feb 4, 2026
@richard67
Copy link
Copy Markdown
Member

As stated in the description, this code runs since ages in the model already.

@laoneo Yes, I've missed that part. Thanks for pointing me to it.

@richard67
Copy link
Copy Markdown
Member

Thanks @laoneo for this PR, and @crimle , @ChrisHoefliger and @rbuelund for testing.

@richard67 richard67 merged commit 641acbe into joomla:5.4-dev Feb 4, 2026
69 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Feb 4, 2026
@laoneo laoneo deleted the task/checkin branch February 4, 2026 19:55
sathwikre pushed a commit to sathwikre/joomla-cms that referenced this pull request Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants