Feature RTC Language Change PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
14 Jul 2025

Pull Request for Issue (#45685 (comment)).

Change this PR to configure user group(s) (like for the standard task operations) instead of having an input field for email addresses.

Summary of Changes

The PR fixes the hard coded default super user group = 8 for notifications, it gets all super user groups from assets.

Every user who is not blocked and has permission "sendEmail" and has a valid email address can receive a notification.
The user must be in a user group which can be selected in the form.
If there is no input in the field or if the selected groups are empty, all active super users get a notification.

Testing Instructions

Make one or more user groups with different users.
User can have senEmali Options or not, can be blocked or not, can be super users or not.
Play around with empty groups, blocked users ..

Add / remove / change selected user groups in the automated update configuration.
Check if all and only users with valid email-address and permission to receive system emails get the email after autoUpdate.

There is a quick and dirty workaround for testing the sendNotification method without the automated update.

Add this into any displayContoller.php, for example com_content:
https://github.com/joomla/joomla-cms/blob/5.4-dev/administrator/components/com_content/src/Controller/DisplayController.php in the display method.

        // Testonly sendNotification
        $notificationModel = \Joomla\CMS\Factory::getApplication()->bootComponent('com_joomlaupdate')
            ->getMVCFactory()->createModel('Notification', 'Administrator');

        $notificationModel->sendNotification('success', '5.4.115' , '5.4.116');

Then go to a view of that component in backend. This acrivate the sendNotification Method.

You can check the email-addresses here:
administrator\components\com_joomlaupdate\src\Model\NotificationModel.php befor the messages are sent:

Simple code snippet if you don't use xdebug:


        // Debugging output
        echo '<pre>';
        echo htmlspecialchars(print_r($emailReceivers, true));
        echo '</pre>';
        exit;

Actual result BEFORE applying this Pull Request

grafik

Expected result AFTER applying this Pull Request

The input form for the Plugin
grafik

The output:
All depends on the input and on the differen users configuration. All users from the input who are not blocked and have sendMail = 1 are listed, only one times.

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

avatar chmst chmst - open - 14 Jul 2025
avatar chmst chmst - change - 14 Jul 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jul 2025
Category Administration com_joomlaupdate Language & Strings
bf2d72e 14 Jul 2025 avatar chmst cs
avatar chmst chmst - change - 14 Jul 2025
Labels Added: Language Change PR-5.4-dev
avatar Fedik
Fedik - comment - 14 Jul 2025

It still should check for Users with sendEmail = 1 ("Receive System Emails" parameter). Please keep that.

avatar chmst chmst - change - 14 Jul 2025
Labels Added: Feature
2992cb3 14 Jul 2025 avatar chmst cs
f1861a3 14 Jul 2025 avatar chmst cs
2b8bcd3 14 Jul 2025 avatar chmst cs
0ef0055 14 Jul 2025 avatar chmst cs
avatar chmst chmst - change - 14 Jul 2025
The description was changed
avatar chmst chmst - edited - 14 Jul 2025
avatar chmst chmst - change - 14 Jul 2025
The description was changed
avatar chmst chmst - edited - 14 Jul 2025
avatar chmst chmst - change - 14 Jul 2025
The description was changed
avatar chmst chmst - edited - 14 Jul 2025
avatar richard67 richard67 - change - 15 Jul 2025
Title
[5.4.0] Autoupdate email groups
[5.4] Autoupdate email groups
avatar richard67 richard67 - edited - 15 Jul 2025
avatar exlemor
exlemor - comment - 1 Aug 2025

@chmst thank you for the PR, I have setup the multiple User Groups and am stuck at the:

"Check if all and only users with valid email-address and permission to receive system emails get the email after autoUpdate."

how do I 'trigger' the autoUpdate? ( I tried the run the scheduled task Update Notification manually but that did nothing, so I am forgetting, missing or not grasping something ).

avatar brianteeman
brianteeman - comment - 1 Aug 2025

I tried the run the scheduled task Update Notification manually but that did nothing,

that wont as its not related to this PR - confusing I know but we now have two different systems that can send an email about updates - and with different settings

avatar exlemor
exlemor - comment - 1 Aug 2025

@chmst Hi Christiane, I inserted the code you gave me, unfortunately, I still don't get an emails triggered :/

Looking forward to test this when you have a minute to tweak the testing instructions (I know you're busy at the moment) :)

avatar muhme
muhme - comment - 2 Aug 2025

how do I 'trigger' the autoUpdate?

@exlemor You trigger Automated Updates in testing environment with:

  • Download and install ''System - Alpha Update Server' from #45540, nothing to be configured -> your test instance is now using the Alpha Automated Updates server
  • Check with 'Check for updates' in (manual) 'Joomla Update', e.g. ‎5.4.112 should be offered, do not update manual! and importand check there are no failed preconditions, e.g. database not in sync -> you have to fix this now
  • Enable Automated Updates
  • Wait up-to 24 hours, you should receive the emails and see the system updated
avatar muhme
muhme - comment - 3 Aug 2025

@chmst I have tested this PR with:

  • Unregistered site from Automated Updates before new installation
  • Cleaned database, new installation from Joomla_5.4.0-alpha4-dev+pr.45721-Development-Full_Package.zip on public joomla-test.heikol.de, with admin1 user, which is member of the 'Super User' group
  • Installed Blog Sample Data
  • Created group system-mail-users with members superuser1 and manager1 (without admin1 and editor1)
  • Created users, each with own unqiue email address:
    • superuser1 with 'Super User' and 'system-mail-users' groups and Receive System Emails enabled
    • manager1 with 'Manager' and 'system-mail-users' group and Receive System Emails enabled
    • editor1 with 'Editor' group and Receive System Emails enabled
  • Configured Automated Updates: removed 'Super Users' group and added 'system-mail-users' group
  • Unregistered from automated update service
  • Checked Mainenance > Database and fixed one problem by update database tables
  • Installed Plugin 'System - Alpha Update Server' from https://github.com/user-attachments/files/20507546/plg_system_alphaupdate.zip
  • Checked Joomla! 5.4.112 update is offered ... Note, this have to be checked twice, first time the answer is only:
    • Update not possible because the offered update is older than the currently installed version.
  • ✅ 2025-08-03T16:26:52+00:00 UTC Update to 5.4.112, frontend site is working
    • administrator backend has error, caused by [5.4] Convert mod_latest to service provider (#45762), and can be ignored for the test of this PR:
      An error has occurred.
      0 Cannot instantiate abstract class Joomla\Module\Latest\Administrator\Helper\LatestHelper
      
  • ❌ Users superuser1 and admin1 received an 'Joomla! updated successfully' email
    • Expected Users superuser1 and manager received the Automated Updates email and users admin and editor not

I am asking me, can we test this PR this way? Or do we need to create an update package from this PR and use it on alpha update server, since the update overwrites this PR and the emails may only be sent after the update?

avatar richard67
richard67 - comment - 3 Aug 2025

I am asking me, can we test this PR this way? Or do we need to create an update package from this PR and use it on alpha update server, since the update overwrites this PR and the emails may only be sent after the update?

I think that is exactly the problem.

avatar chmst
chmst - comment - 3 Aug 2025

It is a problem and I did not test the AutoUpdater itself.
I thought, you all can test the AutoUpdate, it is just me who needs a trick ^^.

To check the email address I had a quick and dirty workaound for testing:

I added a piece of code into the com_joomlaupdate displayController to call the sendNotification Method

    public function display($cachable = false, $urlparams = false)
    {
        // Get the document object.
        $document = $this->app->getDocument();


        // Testonly sendNotification
        $notificationModel = \Joomla\CMS\Factory::getApplication()->bootComponent('com_joomlaupdate')
            ->getMVCFactory()->createModel('Notification', 'Administrator');
        $notificationModel->sendNotification('update', '5.3.0');
        //Testonly 

Now could play around with userGroups and users in the automated update screen.
When you click save or anything else, the controller calls the sendNotification Method..
Add a simple echo into the notificationModel Model - sendNotification method, you can see which users are the $emailReceiver list.

To make it quite clear: I did not test the AutoUpdate itself.

avatar chmst
chmst - comment - 3 Aug 2025

IIf this can be tested, the notification in the uppdateNotification Plugin can be made i the same way

avatar chmst
chmst - comment - 14 Aug 2025

It is possible to find all users with core.admin right, these are the super users.
There are two options for receivers:

  1. All users of defined user goups. Only if there are no groups defined and if in defined usergroups are no active members, notify all super users.
  2. All super users AND all users in defined user groups who have the option sendEmail "on"

I implement now the second option.

All super users AND all users in defined user groups get an email (if they are active and have sendEmail "on").
This is easier to explain and understand

Test instructions for testing only the sendNotification method, not the update!
Add this into any displayContoller.php, you can use com_content (and remove it after test).

`        // Testonly sendNotification
        $notificationModel = \Joomla\CMS\Factory::getApplication()->bootComponent('com_joomlaupdate')
            ->getMVCFactory()->createModel('Notification', 'Administrator');

        $notificationModel->sendNotification('update', '5.3.0');
        //Testonly`
        
avatar richard67
richard67 - comment - 14 Aug 2025

@chmst The default value 8 for the field in the XML still needs to be removed.

0343436 14 Aug 2025 avatar chmst cs
8a55000 14 Aug 2025 avatar chmst cs
avatar richard67 richard67 - change - 15 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 15 Aug 2025
avatar richard67 richard67 - change - 15 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 15 Aug 2025
avatar richard67
richard67 - comment - 15 Aug 2025

@chmst I've allowed myself to copy a part of the instructions in your comment here #45721 (comment) to the testing instructions so testers find it. Please modify if necessary.

avatar dautrich
dautrich - comment - 15 Aug 2025

The Testing instructions lack the exact location where to insert the workaround.

avatar richard67 richard67 - change - 15 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 15 Aug 2025
avatar richard67
richard67 - comment - 15 Aug 2025

The Testing instructions lack the exact location where to insert the workaround.

@dautrich Sorry, that was my mistake when helping with copying the information from a later comment into the testing instructions. I have forgotten some part. I've just updated the instructions. Can you check again? Is it clear enough now? Thanks in advance.

avatar richard67 richard67 - change - 15 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 15 Aug 2025
avatar chmst chmst - change - 21 Aug 2025
The description was changed
avatar chmst chmst - edited - 21 Aug 2025
avatar chmst chmst - change - 21 Aug 2025
The description was changed
avatar chmst chmst - edited - 21 Aug 2025
avatar chmst chmst - change - 21 Aug 2025
Labels Added: PBF
avatar rbuelund
rbuelund - comment - 23 Aug 2025

I have tested this item 🔴 unsuccessfully on 87dc805

  • Any user who has the "Recieve System Emails" enabled, regardless if the users Group (Not a super user group) is selected or not in "Send Email to User Group" recieves an Email
avatar chmst chmst - change - 26 Aug 2025
Labels Removed: PBF
avatar chmst chmst - change - 26 Aug 2025
The description was changed
avatar chmst chmst - edited - 26 Aug 2025
avatar chmst chmst - change - 26 Aug 2025
The description was changed
avatar chmst chmst - edited - 26 Aug 2025
avatar chmst
chmst - comment - 26 Aug 2025

After sone discussions I changed the behaviour:

All users in selected groups receive a notification IF they are active users and IF they have permission "sendEmail". They must not have super user permission.
If the groups have no users or if nothing is selected, all super users get an email (fallback)

@rbuelund Any user who has the "Recieve System Emails" enabled, regardless if the users Group (Not a super user group) is selected or not in "Send Email to User Group" recieves an Email

This is intended behaviour. Also users who are not super users can receive emails for updates.
Tha use case is: there could be a customer who wants to be informed when his site is updated, but does not have super user permissions.
Or did I unterstand wrong?

avatar brianteeman
brianteeman - comment - 26 Aug 2025

They must not have super user permission

Why not?

avatar chmst
chmst - comment - 26 Aug 2025

The use case is: there could be a customer who wants to be informed when his site is updated, but does not have super user permissions

In small and private sites the whole feature will be "inform the one and only super user". In bigger companies this could be different.

avatar richard67
richard67 - comment - 26 Aug 2025

They must not have super user permission

@brianteeman I think that is a typical German translation issue, and she meant not "must not" (German: "darf nicht") but "do not need to have" (German: "müssen nicht ... haben").

@chmst Can you confirm my assumption?

avatar chmst
chmst - comment - 26 Aug 2025

How embarassing! Thank you @richard67!

avatar rbuelund
rbuelund - comment - 26 Aug 2025

So - just to be shure. If no user Groups are selected and no Super Users have the "Recieve System Emails" enabled - then no e-mails are send? I have sites with maybe two Super Users where one should not recieve e-mails and the other should.

avatar brianteeman
brianteeman - comment - 26 Aug 2025

Can you please update the original description to show the current expected behaviour of this pr

avatar chmst chmst - change - 26 Aug 2025
The description was changed
avatar chmst chmst - edited - 26 Aug 2025
avatar chmst
chmst - comment - 26 Aug 2025

I updated already.

@rbuelund
The correct usage would be making a usergroup with only the superuser(s) who receive the notifications.
This group can contain only one super user.
"All super users" is the fallback if nothing else is defined or if the selected usergroup has no members who can receive emails.

avatar muhme
muhme - comment - 27 Aug 2025

Thank you @chmst for your work. First test without settings successful, the initial super user email is shown. Second test failed. I created users heiko and christiane, assigned group Update-To-Be-Informed, configured only this group in Automated Updates. The list contains us, but also the super user email.

avatar chmst chmst - change - 27 Aug 2025
The description was changed
avatar chmst chmst - edited - 27 Aug 2025
avatar chmst chmst - change - 27 Aug 2025
The description was changed
avatar chmst chmst - edited - 27 Aug 2025
avatar chmst chmst - change - 27 Aug 2025
The description was changed
avatar chmst chmst - edited - 27 Aug 2025
avatar richard67
richard67 - comment - 27 Aug 2025

@chmst The last commit for CS fixes was not really good, check indentation.

avatar muhme muhme - test_item - 28 Aug 2025 - Tested successfully
avatar muhme
muhme - comment - 28 Aug 2025

I have tested this item ✅ successfully on bc99f0b

Tested with manual installation as public available site (to be able to activate Automated Updates)

  • And with the given workaround for testing notifications:
    • 1st snippet into components/com_content/src/Controller/DisplayController.php at start of display()
    • 2nd snippet into administrator/components/com_joomlaupdate/src/Model/NotificationModel.php in sendNotification() before // Send emails to all receivers
  • Created one article and using preview to see email receivers debug output
  • Enabled Automated Updates
  • Enabled 'Debug System' and 'Log Almost Everything'
  • Created users and assigned groups and in general user is enabled and with 'Receive System Emails'
    • admin, Registered + Super Users
    • admin2, Registered + Super Users + Update-To-Be-Informed
    • christiane, Registered + Update-To-Be-Informed
    • heiko, Registered + Update-To-Be-Informed
    • richard, Registered + Publisher
    • fedir, Registered + Super Users + Update-To-Be-Informed, disabled user
    • emmanuel, Registered + Super User + Update-To-Be-Informed, disabled 'Receive System Emails'
  • Initial empty group selection field
    • ✅ Email to admin and admin2
  • Using Update-To-Be-Informed group
    • ✅ Email to heiko, christiane and admin2
  • Using 'Super Users' + Update-To-Be-Informed group
    • ✅ Email to heiko, christiane, admin and admin2
  • Using Manager group (w/o members )
    • ✅ Email to admin and admin2
  • Using Manager and Update-To-Be-Informed group
    • ✅ Email to heiko, christiane and admin2
  • Using Registered group
    • ✅ Email to admin, heiko, christiane, admin2 and richard
  • Final disabled 'Receive System Emails' for all users and empty group selection field
    • ✅ empyt array and not crashing upto the testing workaround
  • ✅ Checked log files administrator/logs/* and PHP
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45721.
avatar rbuelund rbuelund - test_item - 28 Aug 2025 - Tested successfully
avatar rbuelund
rbuelund - comment - 28 Aug 2025

I have tested this item ✅ successfully on bc99f0b

I have done more or less the same tests as @muhme


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

avatar rbuelund
rbuelund - comment - 28 Aug 2025

I have tested this item ✅ successfully on bc99f0b


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

avatar richard67 richard67 - change - 28 Aug 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 28 Aug 2025

RTC


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

avatar richard67 richard67 - change - 28 Aug 2025
Labels Added: RTC
avatar brianteeman
brianteeman - comment - 28 Aug 2025

Every user who is not blocked and has permission "sendEmail" and has a valid email address can receive a notification.

is their an email validation check or did you just mean "obviously if the email address is invalid then they wont receive the email"

avatar brianteeman
brianteeman - comment - 28 Aug 2025

Every user who is not blocked and has permission "sendEmail" and has a valid email address can receive a notification.

is there an email validation check or did you just mean "obviously if the email address is invalid then they wont receive the email"

avatar richard67
richard67 - comment - 28 Aug 2025

As the last change was just a code comment clarification, the PR doesn't require new tests, and RTC is still valid.

avatar chmst
chmst - comment - 28 Aug 2025

Every user who is not blocked and has permission "sendEmail" and has a valid email address can receive a notification.

is there an email validation check or did you just mean "obviously if the email address is invalid then they wont receive the email

There is a email validation check.
The address is checked when a user is saved - but just in case.

avatar muhme muhme - close - 28 Aug 2025
avatar muhme muhme - merge - 28 Aug 2025
avatar muhme muhme - change - 28 Aug 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-08-28 13:47:56
Closed_By muhme
avatar muhme
muhme - comment - 28 Aug 2025

Thank you @chmst for your contribution. Thank you @brianteeman, @richard67, @Fedik and @HLeithner for supporting. Thank you @exlemor and @rbuelund for testing.

avatar muhme
muhme - comment - 1 Sep 2025

The test was repeated w/o the given workaround as Alpha (Test) Automated Updates package 5.4.115 with joomla-5.4.0-beta2, with this PR included, is available now. Slightly modified with taking file and database dump after the configuration, checking log files after installation and unregistered from Automated Updates. Recreated from file and database dump for next test.

✅ Running Automated Update 7 (seven) times and checked the email received as specified 👍 😄

avatar richard67 richard67 - change - 9 Sep 2025
The description was changed
avatar richard67 richard67 - edited - 9 Sep 2025

Add a Comment

Login with GitHub to post a comment