bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
1 Sep 2025

Follow up for #45721
.

Summary of Changes

Remove redundant code. The methods return arrays, check for is_array is redundant for super users groups.
Fix the following case:

Suppose we have for example name@domain.de, name2@domain.fr in the input field.
With ArrayHelper, this is transformed to an array, containing two elements with value 0.

The value 0 cannot be used as filter.group_id in the articles model.

Testing Instructions

see #45721

and set manually
$emailGroups = 'name@domain.de, name2@domain.fr';
in the sendNotification method in file administrator/components/com_joomlaupdate/src/Model/NotificationModel.php just after the $emailGroups = statement (line 61 without this PR, line 57 with this PR).

Actual result BEFORE applying this Pull Request

All users with sendEmail get the mail.

Expected result AFTER applying this Pull Request

Only superUsers get the mail

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 - 1 Sep 2025
avatar chmst chmst - change - 1 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2025
Category Administration com_joomlaupdate
avatar laoneo
laoneo - comment - 1 Sep 2025

Is this also the case, when you select only one?

avatar chmst
chmst - comment - 1 Sep 2025

Yes, methods return an array. It can be empty, but it is an array.

ddd18a1 1 Sep 2025 avatar chmst cs
avatar chmst chmst - change - 1 Sep 2025
Labels Added: PR-5.4-dev
avatar richard67 richard67 - change - 2 Sep 2025
Title
autoupdate notification - remove redundant code
[5.4] autoupdate notification - remove redundant code
avatar richard67 richard67 - edited - 2 Sep 2025
avatar muhme muhme - change - 4 Sep 2025
Labels Added: bug
avatar chmst
chmst - comment - 4 Sep 2025

Setting this to draft as we must make sure that the filter.group_id is not 0.

e451171 4 Sep 2025 avatar chmst cs
avatar chmst
chmst - comment - 4 Sep 2025

Re-added code and fixed the following case.

Suppose a 3rd party extension has for example 'name@domain.de, name2@domain.fr' in the input field.
With ArrayHelper, this is transformed to an array, containing two elements with value 0.

The value 0 cannot be used as filter.group_id in the articles model.

453e973 4 Sep 2025 avatar chmst cs
5a067a7 4 Sep 2025 avatar chmst cs
69259ed 4 Sep 2025 avatar chmst cs
af7ccd5 4 Sep 2025 avatar chmst cs
avatar chmst chmst - change - 6 Sep 2025
The description was changed
avatar chmst chmst - edited - 6 Sep 2025
avatar chmst chmst - change - 6 Sep 2025
The description was changed
avatar chmst chmst - edited - 6 Sep 2025
avatar chmst
chmst - comment - 6 Sep 2025

Changed test instructions

avatar chmst chmst - change - 6 Sep 2025
Title
[5.4] autoupdate notification - remove redundant code
[5.4] autoupdate notification - remove redundant code, fix value 0
avatar chmst chmst - edited - 6 Sep 2025
avatar richard67 richard67 - change - 9 Sep 2025
The description was changed
avatar richard67 richard67 - edited - 9 Sep 2025
avatar richard67 richard67 - test_item - 9 Sep 2025 - Tested successfully
avatar richard67
richard67 - comment - 9 Sep 2025

I have tested this item ✅ successfully on 1fb99eb


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

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

I take a quick look at the current code which handles sending autoupdate notification. It does not looks good and it is also not optimized. If you agree, I will open a new PR to improve the current code (which BTW will replace this PR)

avatar richard67
richard67 - comment - 9 Sep 2025

If you agree, I will open a new PR to improve the current code (which BTW will replace this PR)

@joomdonation Who shall agree?

avatar chmst chmst - close - 9 Sep 2025
avatar chmst chmst - change - 9 Sep 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-09-09 11:42:17
Closed_By chmst
avatar chmst
chmst - comment - 9 Sep 2025

@joomdonation feel free

avatar joomdonation
joomdonation - comment - 9 Sep 2025

@joomdonation feel free

OK. Thanks. I will prepare a PR with necessary changes after PR #46050 merged to avoid conflict.

Add a Comment

Login with GitHub to post a comment