RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
9 Sep 2025

Summary of Changes

The default admin language and the selected user language are correctly taken into consideration to determine the correct language for an autoupdate notification mail.

Testing Instructions

  • Prepare a publicly accessible Joomla 5.4 installation
  • install an additional non-en language package, i.e. the german https://github.com/joomlagerman/joomla/releases/tag/5.4.0v1-beta2
  • select the non-en language package as default language for the admin section
  • Allow auto updates for your test site by following the instructions in #45540
  • Wait until your site is auto-updated
  • Perform "before" test as described below
  • Apply the patch
  • Ping me via github comment, so I can trigger a new notification message with your now patched instance
  • Perform "after" test as described below

Actual result BEFORE applying this Pull Request

Notification mail is sent in EN, ignoring the selected default language.

Expected result AFTER applying this Pull Request

Notification mail is sent in the selected non-en language.

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 SniperSister SniperSister - open - 9 Sep 2025
avatar SniperSister SniperSister - change - 9 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Sep 2025
Category Administration com_joomlaupdate
avatar SniperSister SniperSister - change - 9 Sep 2025
The description was changed
avatar SniperSister SniperSister - edited - 9 Sep 2025
avatar brianteeman
brianteeman - comment - 9 Sep 2025

have you got the before and after the wrong way around?

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

@brianteeman good catch. Lesson learned: FIRST coffee, THEN code.

avatar SniperSister SniperSister - change - 9 Sep 2025
Labels Added: PR-5.4-dev
avatar SniperSister SniperSister - change - 9 Sep 2025
The description was changed
avatar SniperSister SniperSister - edited - 9 Sep 2025
avatar tecpromotion tecpromotion - test_item - 9 Sep 2025 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 9 Sep 2025

I have tested this item ✅ successfully on 8d16414


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

avatar joomdonation
joomdonation - comment - 9 Sep 2025

From what I see, the change here is not enough yet. You would need to do the same with how we handle mail template language in User - Joomla plugin https://github.com/joomla/joomla-cms/blob/5.4-dev/plugins/user/joomla/src/Extension/Joomla.php#L216-L228

My quick test with current code:

  • Site is in English language
  • Configure two users receive email with Backend Language set to German

Result:

  • Only first user receives email in German
  • The second user (and everyone after that) still receive email in English
avatar SniperSister SniperSister - change - 9 Sep 2025
Labels Added: bug
avatar richard67
richard67 - comment - 9 Sep 2025

@tecpromotion Could you test again and in addition test also the scenario described in @joomdonation 's comment #46050 (comment) ? Thanks in advance.

avatar richard67
richard67 - comment - 9 Sep 2025

@SniperSister Now PHPStan complains about direct access to the $language property of the Factory class. Could you change that? If it is not possible or reasonable to change it, you have to update the phpstan-baseline.neon file with ./libraries/vendor/bin/phpstan -b to add exclusions for these cases.

avatar tecpromotion tecpromotion - test_item - 9 Sep 2025 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 9 Sep 2025

I have tested this item ✅ successfully on 6c08ecf


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

avatar tecpromotion
tecpromotion - comment - 9 Sep 2025

I have tested this with several languages.
For the German language, we have a total of 5 language packs:

  • de-de
  • de-at
  • de-ch
  • de-li
  • de-lu

I then changed the subject line in the emails and received different emails.

avatar SniperSister
SniperSister - comment - 9 Sep 2025

Done @richard67

avatar richard67
richard67 - comment - 9 Sep 2025
avatar SniperSister
SniperSister - comment - 9 Sep 2025
avatar richard67 richard67 - alter_testresult - 9 Sep 2025 - tecpromotion: Tested successfully
avatar richard67
richard67 - comment - 9 Sep 2025

I've restored the previous human test result in the issue tracker as the commits which have invalidated the test count were just a change of the phpstan baseline file and code style.

avatar richard67
richard67 - comment - 9 Sep 2025

@tecpromotion Sorry to bother you again. Could you test again after the last changes? That would be really great. Thanks in advance, and thanks for previous tests.

avatar joomdonation joomdonation - test_item - 10 Sep 2025 - Tested successfully
avatar joomdonation
joomdonation - comment - 10 Sep 2025

I have tested this item ✅ successfully on 8220078


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

avatar muhme muhme - test_item - 10 Sep 2025 - Tested unsuccessfully
avatar muhme
muhme - comment - 10 Sep 2025

I have tested this item 🔴 unsuccessfully on 8220078

Tested with public available site

  • With Nightly Build
    • No problem with second user with German as backend language > Email is sent in German
    • Problem reproduced with setting Administrator default language as German > Email sent in English
  • With PRs full package, 'Debug System' and 'Log Almost Everything' enabled
    • Setting Administrator default lanaguage as German > Backend is German
    • ❌ Enabled Automated Updates > Email sent in English: 'Your site has been successfully automatically updated from 5.4.0-beta3-dev+pr.46050 to 5.4.115.'
      • Only one superuser admin from installation, no PHP error log entries, Joomla log entries as usually

Could someone else please retest with setting Administrator default language as e.g. German?


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

avatar joomdonation
joomdonation - comment - 10 Sep 2025

Hmm, seems there are more changes needed. @muhme Could you please try to replace the file administrator/components/com_joomlaupdate/src/Model/NotificationModel.php on your Joomla installation with the attached file to see if it works?

NotificationModel.php

avatar muhme
muhme - comment - 10 Sep 2025

@muhme Could you please try to replace the file
I can, but it would need some hours, I am on the way

avatar tecpromotion tecpromotion - test_item - 10 Sep 2025 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 10 Sep 2025

I have tested this item ✅ successfully on 8220078


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

avatar SniperSister
SniperSister - comment - 10 Sep 2025

❌ Enabled Automated Updates > Email sent in English: 'Your site has been successfully automatically updated from 5.4.0-beta3-dev+pr.46050 to 5.4.115.'

@muhme you can't test the PR like this. The 5.4.115 does not include the fix and therefore it will fall back to the EN mail. See test instrucitons.

avatar richard67
richard67 - comment - 10 Sep 2025

@SniperSister Can it be tested by using the first code snippet from the testing instructions of PR #45721 to trigger the notification mail?

avatar SniperSister
SniperSister - comment - 10 Sep 2025

@richard67 the code snippet, an API call, or reaching out to me - whatever works :)

avatar joomdonation
joomdonation - comment - 10 Sep 2025

@SniperSister Can it be tested by using the first code snippet from the testing instructions of PR #45721 to trigger the notification mail?

I also used that instructions for testing.

avatar SniperSister
SniperSister - comment - 10 Sep 2025

I also used that instructions for testing.

Admin Application and API application differ in setup, might be worth to actually trigger the notification via curl instead to make sure the app context does not influence the result:

--header 'X-JUpdate-Token: YOUR_UPDATE_TOKEN'```
avatar SniperSister
SniperSister - comment - 10 Sep 2025

I also used that instructions for testing.

Admin Application and API application differ in setup, might be worth to actually trigger the notification via curl instead to make sure the app context does not influence the result:

curl --location --request POST 'http//YOUR_SITE/api/index.php/v1/joomlaupdate/notificationSuccess' --header 'X-JUpdate-Token: YOUR_UPDATE_TOKEN'

avatar joomdonation
joomdonation - comment - 10 Sep 2025

It really depends on the active language of the current running application. The issue will happen if:

  • The user language is the same with the language of the current running application
  • And the backend language is different

I do not understand how the auto update trigger that email yet but I can see the potential issue by reading logic the code. But if no one else see the issue, you can ignore it.

avatar joomdonation joomdonation - test_item - 10 Sep 2025 - Not tested
avatar joomdonation
joomdonation - comment - 10 Sep 2025

I have not tested this item.


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

avatar tecpromotion
tecpromotion - comment - 10 Sep 2025

It really depends on the active language of the current running application. The issue will happen if:

  • The user language is the same with the language of the current running application
  • And the backend language is different

I do not understand how the auto update trigger that email yet but I can see the potential issue by reading logic the code. But if no one else see the issue, you can ignore it.

I have expanded my test scenario.

I now have six differently configured users.
The starting point is an English backend
One user now uses the backend default language and also receives the email in English.
One user has explicitly set English as the backend language and also receives the email in English.
One user has de-DE as their language and receives the email in German (de-de).
One user has de-AT as their language and receives the email in German (de-at).
One user has de-CH as their language and receives the email in German (de-ch).

@joomdonation which case is not covered and can be tested by me?

avatar joomdonation
joomdonation - comment - 10 Sep 2025

@tecpromotion Please try with the case :

  • Backend set to German
  • Only one active super user account
  • That user account has backend language set to English

I'm unsure if you can re-procedure the issue because as I said, I test it by calling the code to send notification directly as described in #45721 (So I logged in using the super user account to trigger the code, mean the active application at that time running on English)

avatar tecpromotion
tecpromotion - comment - 10 Sep 2025

@tecpromotion Please try with the case :

  • Backend set to German
  • Only one active super user account
  • That user account has backend language set to English

I'm unsure if you can re-procedure the issue because as I said, I test it by calling the code to send notification directly as described in #45721 (So I logged in using the super user account to trigger the code, mean the active application at that time running on English)

  • Backend set to German
  • Only one active super user account
  • That user account has backend language set to English

Result: The email is in German (default backend language), but the only user has English as the backend language in their profile.

avatar SniperSister
SniperSister - comment - 10 Sep 2025
avatar richard67
richard67 - comment - 10 Sep 2025

@joomdonation Could you give it a final test and submit a test result?

@tecpromotion Could you submit a test result? I assume you have already tested with the latest change.

avatar joomdonation joomdonation - test_item - 10 Sep 2025 - Tested successfully
avatar joomdonation
joomdonation - comment - 10 Sep 2025

I have tested this item ✅ successfully on b3393a4


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

avatar tecpromotion
tecpromotion - comment - 10 Sep 2025

If you also want the versions to be displayed in the update email, you can use this command.

curl --location --request POST 'https://YOUR_SITE/api/index.php/v1/joomlaupdate/notificationSuccess' \
--data '{"toVersion":"5.4.115","fromVersion":"5.4.105"}' \
--header 'X-JUpdate-Token: YOUR_UPDATE_TOKEN'
avatar tecpromotion tecpromotion - test_item - 10 Sep 2025 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 10 Sep 2025

I have tested this item ✅ successfully on b3393a4

The final test has now worked with several variants in the language pack configuration.

Thanks @joomdonation and everyone else.


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

avatar tecpromotion tecpromotion - change - 10 Sep 2025
Status Pending Ready to Commit
avatar tecpromotion
tecpromotion - comment - 10 Sep 2025

RTC


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

avatar richard67
richard67 - comment - 10 Sep 2025

RTC


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

avatar muhme muhme - change - 11 Sep 2025
Labels Added: RTC
avatar muhme
muhme - comment - 11 Sep 2025

Final test before merge with manual installation in public available site

  • With Nightly Build
    • The test instruction was slightly modified to cause a failed update and prevent the PR from being overinstalled. The apache user has been denied write permission for files: chown -R root:root public_html
    • Problem reproduced with setting Administrator default language as German > Email sent in English
  • With PRs full package
    • Setting Administrator default language as German > Backend is German
      • ✅ Enabled Automated Updates > Automated Update failed email is sent in German
    • Disabled Automated Updates, created users (system-emails enabled, Super Users group) heiko with explicit German set as backend language and gary with backend language explicit set to English and enabled Automated Updates
      • ✅ The email about the failed Automated Update is sent to admin and heiko in German, and in English to gary
    • Disabled Automated Updates, Created system-emails enabled users richard (default backend language) and phil (explicit set backend language to English), created group 'update-to-be-informed' with the two users and configured 'update-to-be-informed' group and enabled Automated Updates
      • ✅ The email about the failed Automated Update is sent to richard in German, and in English to phil
avatar muhme muhme - change - 11 Sep 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-09-11 09:16:37
Closed_By muhme
avatar muhme muhme - close - 11 Sep 2025
avatar muhme muhme - merge - 11 Sep 2025
avatar muhme
muhme - comment - 11 Sep 2025

Thank you @SniperSister for your contribution. Thank you @brianteeman, @joomdonation and @richard67 for supporting. Thank you @joomdonation and @tecpromotion for testing.

avatar joomdonation
joomdonation - comment - 11 Sep 2025

I made PR #46071 to clean up/improve code further. As you are familiar with update notification email, it would be great if you can help testing it @tecpromotion, @muhme. Thanks !

Add a Comment

Login with GitHub to post a comment