Language Change bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar krishnagandhicode
krishnagandhicode
17 Mar 2026

Pull Request resolves #29169

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Currently when a user sends a private message, the system tries to send an email notification. If the mailer fail (eg due to SMTP issues or mail disabled), the entire save operation returns false. This triggers a red Save failed error in the UI even tho the message is saved to the db and sent to recipient . This leads to confusion.

so I adjusted com_messages save flow so message creation is not marked as failed when only the mail notification fails
In ../Model/MessageModel.php

Removed model hard-failure path both setError + return false in the mail send exception block after the message has already been stored.
Kept a warning COM_MESSAGES_ERROR_MAIL_FAILED
logged technical mail exception details to com_messages log category instead of jerror to avoid showing raw SMTP mail errors.

Testing Instructions

configure a local environment where mail sending should fail (use invalid SMTP host).

go to System > Global Configuration > Server tab.
godown to Mail Settings.
Set send Mail to Yes.
Set mailer to SMTP.
Set SMTP Host to something (fake) like 127.0.0.1 and Port to 25.
now save and close

go to administrator, open users -> messaging -> Private Messages.
Create(click new) and send a new private message to any user

Actual result BEFORE applying this Pull Request

Screenshot 2026-03-18 110244

now login as the user whom you sent the private message in inbox you see the message. (but when you sent the message you only got the error and warning)

Expected result AFTER applying this Pull Request

Screenshot 2026-03-20 230358

It tells you that yes the message is sent and gives warning about the email.


you can also test :

when Mail is explicitly disabled
Global configuration -> server -> Send Mail = No.
now Send a private message.
Verify:
Message is still saved (success banner shown).
Warning is shown about email.
image

also
when No false save failure.
configure a working SMTP - I tested this using (https://ethereal.email/ & laragon mailpit)
Send a private message.
Verify:
Only success banner is shown.
No warning banner.
Notification email is received in the SMTP inbox.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar krishnagandhicode krishnagandhicode - open - 17 Mar 2026
avatar krishnagandhicode krishnagandhicode - change - 17 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Mar 2026
Category Administration com_messages
avatar richard67
richard67 - comment - 17 Mar 2026

Expected result AFTER applying this Pull Request

@krishnagandhicode Do you rally think that makes sense, first message telling that the email could not be sent, and 2nd message telling it was sent?

Or did you maybe mix up the screenshots for the actual and the expected result?

The actual result should describe what happens without this PR, and the expected result should describe what happens with this PR.

avatar krishnagandhicode
krishnagandhicode - comment - 17 Mar 2026

Expected result AFTER applying this Pull Request

@krishnagandhicode Do you rally think that makes sense, first message telling that the email could not be sent, and 2nd message telling it was sent?

Or did you maybe mix up the screenshots for the actual and the expected result?

The actual result should describe what happens without this PR, and the expected result should describe what happens with this PR.

The green Message sent banner refers to the internal Joomla's private message being successfully stored in the database(received by receiver). The yellow The email could not be sent banner refers to the external email notification failing

avatar richard67
richard67 - comment - 17 Mar 2026

Expected result AFTER applying this Pull Request

@krishnagandhicode Do you rally think that makes sense, first message telling that the email could not be sent, and 2nd message telling it was sent?
Or did you maybe mix up the screenshots for the actual and the expected result?
The actual result should describe what happens without this PR, and the expected result should describe what happens with this PR.

The green Message sent banner refers to the internal Joomla's private message being successfully stored in the database(received by receiver). The yellow The email could not be sent banner refers to the external email notification failing

@krishnagandhicode I see. Still confusing at a first look.

Another thing: Now the reason for the email notification error is only in the log file, e.g. the SMTP error. I'm not sure if that is a good idea. Let see if opinions come in.

avatar brianteeman
brianteeman - comment - 17 Mar 2026

The strings need to be modified to be clearer

Perhaps
SMTP Error: The mail could not be sent
The message is available in the users Control Panel

avatar krishnagandhicode krishnagandhicode - change - 18 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 18 Mar 2026
avatar krishnagandhicode
krishnagandhicode - comment - 18 Mar 2026

The strings need to be modified to be clearer

Perhaps SMTP Error: The mail could not be sent The message is available in the users Control Panel

I can think of:
image

Is this okay or we need more (About SMTP) in wanring ?

avatar brianteeman
brianteeman - comment - 19 Mar 2026

the problem with that is its still confusing - at least to me

image
avatar krishnagandhicode krishnagandhicode - change - 19 Mar 2026
Labels Added: bug PR-5.4-dev
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2026
Category Administration com_messages Administration com_messages Language & Strings
avatar krishnagandhicode krishnagandhicode - change - 19 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 19 Mar 2026
avatar krishnagandhicode
krishnagandhicode - comment - 19 Mar 2026

Updated :
Screenshot 2026-03-19 230833

Thanks @exlemor for your suggestion to simply make it clear : )

avatar exlemor exlemor - test_item - 20 Mar 2026 - Tested successfully
avatar exlemor
exlemor - comment - 20 Mar 2026

I have tested this item ✅ successfully on c6d5bdd

I have successfully tested this. Even sent a message to a user with multiple access levels - worked!

Thanks @krishnagandhicode!


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

avatar tecpromotion tecpromotion - test_item - 20 Mar 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 20 Mar 2026

I have tested this item ✅ successfully on c6d5bdd


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

avatar tecpromotion tecpromotion - change - 20 Mar 2026
Status Pending Ready to Commit
avatar tecpromotion tecpromotion - change - 20 Mar 2026
Status Ready to Commit Pending
avatar tecpromotion tecpromotion - change - 20 Mar 2026
Status Pending Ready to Commit
avatar tecpromotion
tecpromotion - comment - 20 Mar 2026

RTC


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

avatar tecpromotion tecpromotion - alter_testresult - 20 Mar 2026 - tecpromotion: Tested successfully
avatar tecpromotion tecpromotion - alter_testresult - 20 Mar 2026 - exlemor: Tested successfully
avatar richard67 richard67 - change - 20 Mar 2026
Labels Added: RTC Language Change
avatar brianteeman
brianteeman - comment - 20 Mar 2026

Would it not be less confusing if you only got one message and not two

avatar brianteeman
brianteeman - comment - 20 Mar 2026

Sorry but this is not correct as we lose important information.

For example if you disable mail in global configuration and then try and send a message the message BEFORE this PR is clear why the email is not sent

image

But with this PR we lose that useful information

image
avatar tecpromotion
tecpromotion - comment - 20 Mar 2026

But with this PR we lose that useful information

That’s true, and it should be looked into again.
@krishnagandhicode could you please have a look at this? Thanks.

avatar richard67
richard67 - comment - 20 Mar 2026

I agree. The confusing thing which should be fixed is the "Save failed ..." despite of the message being saved.

But this PR here now causes a loss of important information.

Back to pending.

avatar tecpromotion tecpromotion - change - 20 Mar 2026
Status Ready to Commit Pending
avatar krishnagandhicode
krishnagandhicode - comment - 20 Mar 2026

Thanks - I am looking into it.

avatar brianteeman
brianteeman - comment - 20 Mar 2026

Maybe just change the second message from

Save failed with the following error: %s

to

Email could not be sent with the following error: %s The message is available in the Joomla administrator

avatar krishnagandhicode
krishnagandhicode - comment - 20 Mar 2026

What about

when mail is disabled :
image

when mail is enabled but SMTP is not configured perfectly
Screenshot 2026-03-20 230358

if needed we can add the Word "Reason" like
The private message was saved, but the email notification could not be sent Reason: The mail function has been disabled by an administrator. (similarly for other case)

avatar krishnagandhicode
krishnagandhicode - comment - 20 Mar 2026

Email could not be sent with the following error: %s The message is available in the Joomla administrator

You mean:
image

and (this needs some clarity ig)
image

avatar muhme
muhme - comment - 21 Mar 2026

I total agree with the issue that the red UI-error Save failed with the following error: The email could not be sent. gives the wrong signal as the message is stored and delivered to the user as Joomla private message.

I am afraid of the green UI-note Private message is sent. I guess most users will not differentiate between email message and Joomla private message. And they are getting confused is the email sent or not.

  1. What about having the two following UI-notes:
  • Red Error: Email could not be sent: %s
  • Green Notice: The user can view the message in Joomla administrator Private Messages.
  1. The success case with the short green Message sent. may say too little? Provide more details?
  • Green Notice: The message is sent as email and the user can view the message in Joomla administrator Private Messages.

@brianteeman and @chmst what are you thinking?

avatar krishnagandhicode
krishnagandhicode - comment - 21 Mar 2026

@muhme Thanks for looking into this.

  • Green Notice: The user can view the message in Joomla administrator Private Messages.

or:
Private Message sent to user's Joomla Administrator Private Messages
Or:
Private Message sent to user's Administrator Private Messages
Or:
Private message successfully saved to the Recipient's Private Inbox


  • Green Notice: The message is sent as email and the user can view the message in Joomla administrator Private Messages.

maybe this is bit confusing because It says: message is sent as email and/but can be viewed by user in user's Joomla administrator Private Messages.

Would love to see what others think/say : )

avatar brianteeman
brianteeman - comment - 22 Mar 2026

The option shown here #47413 (comment) works for me

Its not perfect but I dont think this is something that can ever be perfect and its better than it is currently

avatar krishnagandhicode krishnagandhicode - change - 22 Mar 2026
Labels Removed: RTC
avatar krishnagandhicode krishnagandhicode - change - 22 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 22 Mar 2026
avatar krishnagandhicode
krishnagandhicode - comment - 22 Mar 2026

Updated.

avatar krishnagandhicode krishnagandhicode - change - 22 Mar 2026
The description was changed
avatar krishnagandhicode krishnagandhicode - edited - 22 Mar 2026
avatar exlemor exlemor - test_item - 26 Mar 2026 - Tested successfully
avatar exlemor
exlemor - comment - 26 Mar 2026

I have tested this item ✅ successfully on 65ae849

I have re-tested this successfully. Thanks @krishnagandhicode for the perseverance.


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

avatar muhme
muhme - comment - 4 Apr 2026

Discussed between the release managers: ✅ We have decided on the current implementation as it eliminates the main source of confusion in the user experience.

avatar richard67
richard67 - comment - 4 Apr 2026

Hmm, theoretically this is a change of the language string COM_MESSAGES_ERROR_MAIL_FAILED which can be done only in a new minor release after (change of meaning or change of sprintf parameters, here the latter). So it would need to add a new string with a new key and deprecate the old string and so on.

Or can we be 100% sure that this string is only used by the core?

avatar brianteeman
brianteeman - comment - 4 Apr 2026

The rules on changing the meaning of language strings are clear. This would need to be a new strings as the changes are substantially different in meaning

avatar krishnagandhicode
krishnagandhicode - comment - 4 Apr 2026

Agreed.
I will keep COM_MESSAGES_ERROR_MAIL_FAILED unchanged to preserve existing meaning, and add a new string maybe COM_MESSAGES_ERROR_MAIL_FAILED_REASON with a %s placeholder for the specific mail error reason used in this PR.

Is that alright ?

avatar richard67
richard67 - comment - 4 Apr 2026

Agreed. I will keep COM_MESSAGES_ERROR_MAIL_FAILED unchanged to preserve existing meaning, and add a new string maybe COM_MESSAGES_ERROR_MAIL_FAILED_REASON with a %s placeholder for the specific mail error reason used in this PR.

Is that alright ?

@krishnagandhicode Yes, that looks good.

avatar richard67
richard67 - comment - 4 Apr 2026

@krishnagandhicode P.S.: You could also check if the old string COM_MESSAGES_ERROR_MAIL_FAILED is still used somewhere. If that is not the case and it's unused, you can add a comment line above it with a deprecation comment. But if not 100% sure, leave it as it is without a deprecation comment.

avatar dautrich dautrich - test_item - 4 Apr 2026 - Tested successfully
avatar dautrich
dautrich - comment - 4 Apr 2026

I have tested this item ✅ successfully on 8e2670f


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

avatar krishnagandhicode
krishnagandhicode - comment - 4 Apr 2026

@krishnagandhicode P.S.: You could also check if the old string COM_MESSAGES_ERROR_MAIL_FAILED is still used somewhere. If that is not the case and it's unused, you can add a comment line above it with a deprecation comment. But if not 100% sure, leave it as it is without a deprecation comment.

checked for COM_MESSAGES_ERROR_MAIL_FAILED is not used in code anymore so added a deprecation comment.

avatar richard67
richard67 - comment - 4 Apr 2026

I have tested this item ✅ successfully on 8e2670f

@dautrich Have you tested with the latest changes (new string COM_MESSAGES_ERROR_MAIL_FAILED_REASON instead of changed string COM_MESSAGES_ERROR_MAIL_FAILED? O'm asking because your test came very quickly after that change, so I think maybe you have tested the previous version.

avatar richard67
richard67 - comment - 4 Apr 2026

@exlemor Could you test again with the latest changes? Thanks in advance.

avatar dautrich
dautrich - comment - 4 Apr 2026

@richard67
I didn't check for the language strings at all. It took me some time to set up my environment. Therefore I assume that I tested before the language strings were changed.

How can I check the language strings?

avatar richard67
richard67 - comment - 4 Apr 2026

How can I check the language strings?

@dautrich Just test again with the new prebuilt packages or by applying the PR again. You can check if the administrator/language/en-GB/com_messages.ini file contains the changes shown here: https://github.com/joomla/joomla-cms/pull/47413/changes#diff-dbf9e295e3d9d1a1e10bd7fd303682bb0e519ef90cb8554903bc32d13127a99c

avatar dautrich dautrich - test_item - 5 Apr 2026 - Tested successfully
avatar dautrich
dautrich - comment - 5 Apr 2026

I have tested this item ✅ successfully on 685155b

- Tested with Patchtester, also the optional tests

avatar exlemor exlemor - test_item - 6 Apr 2026 - Tested successfully
avatar exlemor
exlemor - comment - 6 Apr 2026

I have tested this item ✅ successfully on 685155b

I have successfully restested this. Thanks @krishnagandhicode!


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

avatar alikon alikon - change - 6 Apr 2026
Status Pending Ready to Commit
avatar alikon
alikon - comment - 6 Apr 2026

RTC


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

Add a Comment

Login with GitHub to post a comment