? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
22 Nov 2021

Pull Request for Issue #35868.

Summary of Changes

This PR proposes a solution for issue #35868. Basically, it does 3 things:

  • Convert none self URLs (for example, link to article.., link to menu item... inserted by editor buttons) to absolute sef urls.
  • Convert relative URLs (for example, link to an image...) to absolute URLs
  • Show editor buttons in editor so to allow easier insert menu item, article... to HTML mail template.

Most of the code is copied from the System - Sef plugin https://github.com/joomla/joomla-cms/blob/4.0-dev/plugins/system/sef/sef.php#L106-L134. I think this should be enough for email content.

Testing Instructions

  1. Go to System -> Mail Templates, click on Options button in the toolbar, change Mail Format to Html.
  2. Apply patch
  3. Edit Global Configuration: Test Mail email template, try to insert image, menu item, article to the template
  4. Go to System -> Global Configuration, try to send test mail. Check the received image, make sure the image is displayed, link to menu item, article is accessible. It is not working before this PR (you can test it by revert PR, then resend the email, these content won't be accessible anymore)

Actual result BEFORE applying this Pull Request

Images not being displayed, links... are not accessible in the email.

Expected result AFTER applying this Pull Request

Images are being displayed properly, links... are accessible in the email.

Documentation Changes Required

None.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar joomdonation joomdonation - open - 22 Nov 2021
avatar joomdonation joomdonation - change - 22 Nov 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2021
Category Administration Libraries
avatar Quy Quy - change - 22 Nov 2021
Labels Added: ?
6838f31 22 Nov 2021 avatar Quy cs
avatar dgrammatiko
dgrammatiko - comment - 22 Nov 2021

@joomdonation out of curiosity injecting a base tag in the head wouldn't be easier <base href="<?php echo Uri::root(false)" /> ?

Context: https://www.caniemail.com/ doesn't show which clients support this tag but this issue hteumeuleu/caniemail#199 probably implies that the tag is widely supported
I'm NOT an email expert!!!

avatar joomdonation
joomdonation - comment - 23 Nov 2021

@dgrammatiko We don't know if this is supported, and I even unsure where and how we should add that base tag in email content, so I will stay with the current solution.

avatar dgrammatiko
dgrammatiko - comment - 23 Nov 2021

@dgrammatiko We don't know if this is supported, and I even unsure where and how we should add that base tag in email content, so I will stay with the current solution.

The whole mail thing in Joomla is a huge hack. There should have been a document type email and then most things could follow the architecture...

avatar mrownicki mrownicki - test_item - 24 Nov 2021 - Tested successfully
avatar mrownicki
mrownicki - comment - 24 Nov 2021

I have tested this item successfully on 8b77098

Convert relative URLs (for example, link to an image...) to absolute URLs.
WORK

Show editor buttons in editor so to allow easier insert menu item, article... to HTML mail template.
WORK

Convert none self URLs (for example, link to article.., link to menu item... inserted by editor buttons) to absolute sef urls.
WORK


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36088.
avatar aftertaf
aftertaf - comment - 30 Nov 2021

To add further confirmation:
Convert relative URLs (for example, link to an image...) to absolute URLs.
WORK

Show editor buttons in editor so to allow easier insert menu item, article... to HTML mail template.
WORK

Convert none self URLs (for example, link to article.., link to menu item... inserted by editor buttons) to absolute sef urls.
WORK


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36088.
avatar joomdonation joomdonation - alter_testresult - 30 Nov 2021 - aftertaf: Tested successfully
avatar joomdonation joomdonation - change - 30 Nov 2021
Status Pending Ready to Commit
avatar joomdonation
joomdonation - comment - 30 Nov 2021

I set the test result for @aftertaf manually. Set this to RTC after 2 successful tests.


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

avatar aftertaf
aftertaf - comment - 1 Dec 2021

I have tested this item successfully on 8b77098


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

avatar aftertaf aftertaf - test_item - 1 Dec 2021 - Tested successfully
avatar pritam825
pritam825 - comment - 2 Dec 2021

I have tested this item successfully on 8b77098


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

avatar pritam825 pritam825 - test_item - 2 Dec 2021 - Tested successfully
avatar khu5h1
khu5h1 - comment - 5 Dec 2021

I have tested this item successfully on 8b77098


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

avatar khu5h1 khu5h1 - test_item - 5 Dec 2021 - Tested successfully
avatar bembelimen bembelimen - change - 21 Jan 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-21 22:05:26
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 21 Jan 2022
avatar bembelimen bembelimen - merge - 21 Jan 2022
avatar bembelimen
bembelimen - comment - 21 Jan 2022

Thx

Add a Comment

Login with GitHub to post a comment