Feature Language Change Documentation Required PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
6 Aug 2023

Summary of Changes

move sessiongc from system plugin to scheduler/task plugin

Testing Instructions

Hint: The execution times and hours shown for tasks in the administrator are in the UTC timezone.

New installation

Make a new installation with this PR applied.

Check if there is an enabled task scheduler plugin "Task - Session Data Purge".

Check if there is an enabled scheduled task "SessionGC" using that plugin.

Check that the new task shall run every 24 hours at the hour when the Joomla installation was made.

Update

On a Joomla 4.4-dev version or 4.4.0 alpha 4, note the endabled status and the configuration parameters of the "System - Session Data Purge" plugin.

Now either disable that plugin or enable it and optionally change some of the configuration parameters to a value different to the default.

Update to the patched package or custom update URL created by Drone for this PR.

Check if the "System - Session Data Purge" plugin has been uninstalled.

Check if there is a task scheduler plugin "Task - Session Data Purge".

Check enabled status and configuration parameters of that plugin.

Check if there is a scheduled task "SessionGC" using that plugin. If so, check the configuration parameters, too.

Repeat the previous steps with different endabled status and configuration parameters of the "System - Session Data Purge" plugin.

Actual result BEFORE applying this Pull Request

Deletion of outdated session data is done with the "System - Session Data Purge" plugin.

Expected result AFTER applying this Pull Request

New installation

The "Task - Session Data Purge" plugin is enabled, and a scheduled task "SessionGC" is enabled to run every 24 hours at the hour of the Joomla installation.

Update

The "System - Session Data Purge" plugin has been uninstalled by the update.

A new task scheduler plugin "Task - Session Data Purge" has been created and is enabled.

If the old "System - Session Data Purge" plugin was enabled before the update, a new scheduled task "SessionGC" has been created and is enabled.

It will execute every 24 hours at the hour of the Joomla installation.

The configuration parameters "Enable Session Data Cleanup", "Enable Session Metadata Cleanup", "Probability" and "Divisor" of that task are set to the same values as the same parameters in the old system plugin's parameters:

If the old "System - Session Data Purge" plugin was disabled before the update, there is no task for that plugin.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org: link will be added later

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 6 Aug 2023
Category Administration com_admin SQL Postgresql Language & Strings Installation Libraries Front End Plugins
avatar alikon alikon - open - 6 Aug 2023
avatar alikon alikon - change - 6 Aug 2023
Status New Pending
d6ba125 6 Aug 2023 avatar alikon cs
avatar alikon alikon - change - 6 Aug 2023
Labels Added: Language Change PR-5.0-dev
649f3fc 6 Aug 2023 avatar alikon cs
avatar heelc29
heelc29 - comment - 6 Aug 2023

Where is the code to add the task in the database for new J5.0 installations?

avatar richard67
richard67 - comment - 6 Aug 2023

Where is the code to add the task in the database for new J5.0 installations?

@alikon @heelc29 is right: As on a new J5 installation the secciongc plugin would be enabled by default, it needs something like this here: https://github.com/joomla/joomla-cms/pull/40788/files#diff-fa733b616bbcc3e559d5003d630a5ba449c1cec34c00d1f44aa6d6c7d1dc75d0

8cb3d53 10 Aug 2023 avatar alikon pgsql
avatar alikon
alikon - comment - 10 Aug 2023

Where is the code to add the task in the database for new J5.0 installations?

@alikon @heelc29 is right: As on a new J5 installation the secciongc plugin would be enabled by default, it needs something like this here: https://github.com/joomla/joomla-cms/pull/40788/files#diff-fa733b616bbcc3e559d5003d630a5ba449c1cec34c00d1f44aa6d6c7d1dc75d0

done thx for reporting

avatar alikon alikon - change - 11 Aug 2023
Labels Added: Feature
dfd5abf 11 Aug 2023 avatar alikon cs
3d87e26 11 Aug 2023 avatar alikon cs
85e5411 13 Aug 2023 avatar alikon norm
84f3d4e 14 Aug 2023 avatar alikon cs
avatar richard67
richard67 - comment - 25 Aug 2023

@alikon It needs again to rename the update SQL scripts, this time to something newer than "5.0.0-2023-08-21.sql". I suggest to use "5.0.0-2023-08-26.sql" for this PR here.

avatar alikon
alikon - comment - 26 Aug 2023

done

avatar heelc29
heelc29 - comment - 26 Aug 2023

@alikon check alikon#31 please

avatar richard67
richard67 - comment - 26 Aug 2023

@alikon I've solved the merge conflict caused by the recently merged globalcheckin task plugin, so before you continue to work locally on your branch you have to pull the changes from remote.

avatar alikon
alikon - comment - 27 Aug 2023
avatar richard67
richard67 - comment - 1 Sep 2023

@alikon I've allowed myself to update the branch and apply some small code style fix. Now I think it needs better testing instructions. I suggest something as follows for this PR here, and will later make suggestions also for the other 4 PRs. Feel free to just copy it and paste into the descriptions of the PRs, or modify them as you want.

Testing Instructions

New installation

Make a new installation with this PR applied.

Check if there is an enabled task scheduler plugin "Task - Session Data Purge".

Check if there is an enabled scheduled task "SessionGC" using that plugin.

Check that the new task shall run every 24 hours at the hour when the Joomla installation was made.

Update

On a Joomla 4.4-dev version or 4.4.0 alpha 4, note the endabled status and the configuration parameters of the "System - Session Data Purge" plugin.

Now either disable that plugin or enable it and optionally change some of the configuration parameters to a value different to the default.

Update to the patched package or custom update URL created by Drone for this PR.

Check if the "System - Session Data Purge" plugin has been uninstalled.

Check if there is a task scheduler plugin "Task - Session Data Purge".

Check enabled status and configuration parameters of that plugin.

Check if there is a scheduled task "SessionGC" using that plugin. If so, check the configuration parameters, too.

Repeat the previous steps with different endabled status and configuration parameters of the "System - Session Data Purge" plugin.

Actual result BEFORE applying this Pull Request

Deletion of outdated session data is done with the "System - Session Data Purge" plugin.

Expected result AFTER applying this Pull Request

New installation

The "Task - Session Data Purge" plugin is enabled, and a scheduled task "SessionGC" is enabled to run every 24 hours at the hour of the Joomla installation.

Update

The "System - Session Data Purge" plugin has been uninstalled by the update.

A new task scheduler plugin "Task - Session Data Purge" has been created and is enabled.

If the old "System - Session Data Purge" plugin was enabled before the update, a new scheduled task "SessionGC" has been created and is enabled.

It will execute every 24 hours at the hour of the Joomla installation.

The configuration parameters "Enable Session Data Cleanup", "Enable Session Metadata Cleanup", "Probability" and "Divisor" of that task are set to the same values as the same parameters in the old system plugin's parameters:

If the old "System - Session Data Purge" plugin was disabled before the update, there is no task for that plugin.

avatar richard67 richard67 - change - 2 Sep 2023
The description was changed
avatar richard67 richard67 - edited - 2 Sep 2023
avatar richard67 richard67 - change - 2 Sep 2023
The description was changed
avatar richard67 richard67 - edited - 2 Sep 2023
avatar richard67
richard67 - comment - 2 Sep 2023

@heelc29 The PR is ready for testing. Code style error is not related to the PR but to the current 5.0-dev branch. Could you test again? Testing instructions can be found in the description of this PR. Thanks in advance.

avatar richard67 richard67 - change - 2 Sep 2023
The description was changed
avatar richard67 richard67 - edited - 2 Sep 2023
avatar richard67 richard67 - change - 2 Sep 2023
Labels Added: Documentation Required
avatar richard67
richard67 - comment - 3 Sep 2023

The language strings for the backend, e.g. the plugin name, are not translated. The reason could be the casing of the Plugin PHP files, "SessionGC" instead of "Sessiongc".

avatar richard67 richard67 - test_item - 3 Sep 2023 - Tested unsuccessfully
avatar richard67
richard67 - comment - 3 Sep 2023

I have tested this item ? unsuccessfully on cc22a2a

The language strings for the task in backend, e.g. the task type in the task list, or the parameter labels and descriptions in the form, are not translated. The reason could be the casing of the Plugin PHP files, "SessionGC" instead of "Sessiongc".


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

avatar richard67 richard67 - alter_testresult - 3 Sep 2023 - richard67: Tested unsuccessfully
avatar HLeithner HLeithner - change - 4 Sep 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-04 09:38:56
Closed_By HLeithner
avatar HLeithner HLeithner - close - 4 Sep 2023
avatar HLeithner HLeithner - merge - 4 Sep 2023
avatar HLeithner
HLeithner - comment - 4 Sep 2023

thanks richard for finishing this pr.

avatar alikon
alikon - comment - 4 Sep 2023

thank you all for your help

Add a Comment

Login with GitHub to post a comment