Feature RTC PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar ManuelHu
ManuelHu
5 Mar 2023

Pull Request for Issue #39851. This is essentially my strategy "3" as outlined in the issue, with the difference that the two replacement arrays are not merged. As I did not receive any comments on the issue, I just went ahead to implement this solution....

Summary of Changes

This needed multiple changes:

  1. MailTemplate now supports an extra set of replacement values for the plain-text mode. This will only be used if set explicitely, and will fall back to the old behaviour otherwise. The 'default' data and the plain data are not merged. Callers have to ensure that both sets of values contain the same keys, or otherwise output might be missing.
  2. ActionlogModel uses this new facility to provide values without HTML links.
  3. ActionlogsHelper::getHumanReadableLogMessage() already had a parameter $generateLinks, that did not do what was documented. It only controlled the conversion from relative to absolute URLs. Now it will also remove link tags from the message templates, if set to false.

Note: This also affects the CSV export feature of the actionlogs components. Until now, the exported files contained relative urls in the administrator application (which is - I think - quite useless anyway). With this PR, links are also stripped. (This is the the only other call site that changed the value of $generateLinks to false.)

Testing Instructions

  • Install a recent 4.3.0 nighly build, that already has #39850 upmerged.
  • Make sure action logs for user events are enabled and configure working system email sending
  • In the user settings for a user with a valid email address (you can receive mail on), enable user action information emails for the user component.
  • Log out and log back in
  • Look at the emails you should have received

Actual result BEFORE applying this Pull Request

Plain text emails contain HTML links

Expected result AFTER applying this Pull Request

Plain text emails do not contain HTML links and only the link text.

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 joomla-cms-bot joomla-cms-bot - change - 5 Mar 2023
Category Administration Libraries
avatar ManuelHu ManuelHu - open - 5 Mar 2023
avatar ManuelHu ManuelHu - change - 5 Mar 2023
Status New Pending
avatar ManuelHu ManuelHu - change - 6 Mar 2023
Labels Added: PR-4.3-dev
avatar HLeithner
HLeithner - comment - 8 May 2023

This pull request has been automatically rebased to 5.0-dev. No new features will be merged into Joomla! 4.3 series. Joomla! 4.4 series is a bridge release to make migration from Joomla! 4 to 5 as smooth as possible.

avatar ManuelHu
ManuelHu - comment - 9 May 2023

From a users perspective I would not classify this a s a new feature, but I also don't want to argue about that :-) (From the code point of view it is a new feature...)

To get this finally into 5.0, I would like to have some feedback if the slight b/c break here is accepatable:

  • Adding a new parameter with a defult value should not even be a problem?
  • The $generateLinks parameter of ActionlogsHelper::getHumanReadableLogMessage() changes it's semantics, but should not be covered by the b/c policy (as the function is part of a component helper, and not a core library)
  • --> this has effects on the CSV export which now will also not contain links.
avatar ManuelHu ManuelHu - change - 30 Jun 2023
Labels Added: Feature PR-5.0-dev
Removed: PR-4.3-dev
avatar ManuelHu
ManuelHu - comment - 30 Jun 2023

I have rebased this to the current 5.0-dev. Can someone test this that we can get this timely for 5.0? @Quy

avatar ceford ceford - test_item - 14 Sep 2023 - Tested successfully
avatar ceford
ceford - comment - 14 Sep 2023

I have tested this item ✅ successfully on b8995aa

Works fine: without patch email is hard to read because of links; with patch it is plain text.


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

avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 5.1-dev.

avatar viocassel viocassel - test_item - 15 Nov 2023 - Tested successfully
avatar viocassel
viocassel - comment - 15 Nov 2023

I have tested this item ✅ successfully on b8995aa


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

avatar Quy Quy - change - 15 Nov 2023
Status Pending Ready to Commit
avatar Quy
Quy - comment - 15 Nov 2023

RTC


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

avatar Razzo1987 Razzo1987 - change - 28 Dec 2023
Labels Added: RTC PR-5.1-dev
Removed: PR-5.0-dev
avatar Razzo1987 Razzo1987 - change - 28 Dec 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-12-28 11:39:09
Closed_By Razzo1987
avatar Razzo1987 Razzo1987 - close - 28 Dec 2023
avatar Razzo1987 Razzo1987 - merge - 28 Dec 2023
avatar Razzo1987
Razzo1987 - comment - 28 Dec 2023

Thanks you!

Add a Comment

Login with GitHub to post a comment