Language Change NPM Resource Changed PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar RickR2H
RickR2H
1 Nov 2022

Summary of Changes

This plugin adds the option to use module versions. Every time a module is saved, a new version is stored in the database.

Image-001

Stored versions can be restored by selection the version you want to restore and clicking the Restore button. The current version is marked with a star. If a version is restored and again saved, then this will be a new version.

Image-002

The module parameters can be viewed in an accordion as raw output for comparison.

Image-003

In the plugin parameters there are two options. One to disable the parameter view and one to set the number of versions.

Image-004

When a module is deleted, also the corresponding versions for that module will be deleted.

Note: The is some styling added, so a npm ci for building the stylesheets is required,

Testing Instructions

  1. Install a module for testing
  2. Save the module for the first time. The version button is now visible,
  3. Make some changes to the module and store again.
  4. Compare the versions via the tabs
  5. Restore a stored version and check if all settings are restored. (User Access is not stored in the module so can't be restored).
  6. Delete the module a check the database of all corresponding versions of that module are deleted.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org: Will be created after this PR is merged.

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org: Will be created after this PR is merged.

  • No documentation changes for manual.joomla.org needed

avatar RickR2H RickR2H - open - 1 Nov 2022
avatar RickR2H RickR2H - change - 1 Nov 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Nov 2022
Category Administration Language & Strings Repository NPM Change SQL Installation Postgresql Front End Plugins
avatar obuisard obuisard - change - 1 Nov 2022
Labels Added: Language Change NPM Resource Changed PR-4.3-dev
avatar brianteeman
brianteeman - comment - 1 Nov 2022

Great stuff. Really looking forward to this. Just wondering if it should use the same ui as versioning in com_content etc?

avatar brianteeman
brianteeman - comment - 1 Nov 2022

This PR is missing the update sql

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Module params really should be passed through JText

image

avatar brianteeman
brianteeman - comment - 1 Nov 2022

When testing a "custom html" module the content really should be displayed readonly/disabled.

For example the welcome to joomla module in the sample data has a button in the content. As it is active you can click on it - and then that produces an error

image

image

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Module Settings - This runs through JText which is great but you also need to ensure that the access level is displayed correctly

image

avatar brianteeman
brianteeman - comment - 1 Nov 2022

image

It is not clear that the first link is just for checking the radio or that there even is a second clickable link

avatar brianteeman
brianteeman - comment - 1 Nov 2022

When the module param is stored in the database as a 0 it is not displayed in the versions

image

image

image

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Because the UI doesnt allow you to compare two versions it makes it very hard to see what has changed

avatar brianteeman
brianteeman - comment - 1 Nov 2022

There needs to be a process that creates entries in the module_versions table for all existing modules when joomla is updated to a version that includes this plugin.

Otherwise what happens is that you open an existing article, make a change and save.
there is now ONE entry in the versions table. so if you click on the versions button it will only show you the current version and not the previous version

avatar brianteeman
brianteeman - comment - 1 Nov 2022

The most important thing for me would be to see any changes in the menu assignment. this is completely missing

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Start and finish publishing. This is missing

image

image

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Frontend Module changes

If you edit a module in the frontend then a change is not recorded in the module_versions table

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Resolving all of the above and this will be an awesome addition

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Resolving all of the above and this will be an awesome addition

avatar brianteeman
brianteeman - comment - 1 Nov 2022

Resolving all of the above and this will be an awesome addition

avatar obuisard
obuisard - comment - 1 Nov 2022

Thank you, Brian @brianteeman , very thorough walkthrough, appreciated!

avatar laoneo
laoneo - comment - 2 Nov 2022

Why are you not using the version system we have already? Putting that functionality into a system plugin which gets loaded on every page is a wrong approach. This should all be built into the modules component and not into a plugin. What is the reason to have this in a system plugin?

avatar rdeutz
rdeutz - comment - 2 Nov 2022

Sorry I forgot to let you know what a better way is. You should look into the contenthistory component how it is done for content. What you also have to do is to save the modules in the history table, add a version to the modules table, maybe also to the modules to menu table. Then make sure only the module with the higest version is loaded. And I am sure I forget something but this should be the way to go.

I am going to close this PR.

avatar rdeutz rdeutz - change - 2 Nov 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-11-02 08:47:19
Closed_By rdeutz
avatar rdeutz rdeutz - close - 2 Nov 2022
avatar obuisard
obuisard - comment - 2 Nov 2022

Thank you all for the feedback, it is much appreciated.

avatar obuisard
obuisard - comment - 2 Nov 2022

Thank you to Rick @RickR2H who took the time to improve on a his own project and for providing it to Joomla. This feature has been introduced after listening to feedback from users. Let's rework it and introduce it soon!

avatar RickR2H
RickR2H - comment - 2 Nov 2022

For people interested in using this plugin on there site, please go to https://github.com/R2H-BV/moduleversion/releases to download the latest version. @brianteeman thanks for all your feedback. I'll try to implement the things mentioned by you.

Add a Comment

Login with GitHub to post a comment