User tests: Successful: Unsuccessful:
Pull Request for Issue #45637 , #45032.
delete metadata from db too
When executed via the backend, the task successfully removes expired sessions.
When executed via CLI, the task is marked as "Completed" in the execution log, but expired session records remain in the database the session cleanup does not occur.
Expired session records (older than the configured lifetime) are removed from the #__session table both when:
The task is executed via the backend
The task is executed via the CLI (cron)
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Front End Plugins |
| Labels |
Added:
PR-5.3-dev
|
||
I think it will be best to restore the code to your original commit. Could you please do that? Sorry for the inconvenience.
@joomdonation yes done and don't worry it is always better to have another couple of eyes
This pull request has been automatically rebased to 5.4-dev.
| Labels |
Added:
bug
|
||
| Labels |
Added:
PR-5.4-dev
Removed: PR-5.3-dev |
||
| Title |
|
||||||
Could you clarify the testing instructions?
I don't have a "System - Session Garbage Collector" plugin.
Schedule the com_plugins.task.sessiongc task using Joomla Scheduler - does that mean go to Scheduled Tasks and edit the Ssssion GC task? The Advanced tab has Logging disabled and Task Success disabled.
My session table only has entries for today so I am unsure how to accumulate entries for a few days. Am I supposed to turn off Enable Session Data Cleanup?
I have tested this item ✅ successfully on 2a12605
Tested with JBT, before PR graft nightly build,
php cli/joomla.php scheduler:run -i 2 (ID 2 is 'Session GC')Applied PR with Patch Tester
php cli/joomla.php scheduler:run -i 2php cli/joomla.php scheduler:run -i 2 -> database entries are not reducedI have tested this item ✅ successfully on 2a12605
The test notes from @muhme helped!
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
RTC
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-11-08 11:45:04 |
| Closed_By | ⇒ | richard67 |
Thanks @alikon for this bug fix, @joomdonation for review, and @ceford and @muhme for testing.
Hi,
I'm just a basic user (not developper) and I had to disable the 2 other tasks to make the session gc worging (clicking on "Run test" or "Exécuter le test" in French). I enclose an image.
I would appreciate if someone could let me know (for a basic user) how to set the command php cli/joomla.php scheduler:run -i 2 (in which file? is it between ...)
Regards.
Xavier
Sorry @alikon. Thinking more about it, this still does not work properly with the combination of following conditions:
To make it works for every possible cases, the if condition will be more complicated, difficult to understand for a very little benefit, so after thinking for a while, I think it will be best to restore the code to your original commit. Could you please do that? Sorry for the inconvenience.