Feature Language Change PBF 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

As suggested. Every user who is not blocked and has a valid email address can receive a notification. The user must be in a user group which can be selcted in the form.

Testing Instructions

Make one or more user groups with different users in different userGroups. Play around wit 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.

To check the email address 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#L61

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

        $notificationModel->sendNotification('update', '5.3.0');

Then go to a view of that component in backend. foe example content - Articles.

You can check the email-addresses here:
administrator\components\com_joomlaupdate\src\Model\NotificationModel.php after line 62.

Simple code 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 super users and all users from the input who are not blocked and have senMail = 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

Add a Comment

Login with GitHub to post a comment