Details
-
Bug
-
Resolution: Obsolete
-
Low
-
3.11, 5.2.11, 6.0.2
-
3.11
-
Description
Relates to JRA-9699 but is not the same. When referencing an image like !myimage.jpg! in wiki markup in description or comment or whatever, this appears as a broken link in the email that is sent.
Base URL is correctly set in config, and site added to safe senders in outlook. Unlike JRA-9699, I don't see how this could ever work. Whereas all icons and stylesheets have the full URL, the image is rendered as:
<img src="/secure/attachment/10833/10833_screenshot-1.jpg" align="absmiddle" border="0" />
There's no base href in the email so this will not work. It does work if one uses the full URL in the wiki text.
Currently I'm thinking about adding a <base href...> tag in the email/html/includes/header.vm file, hopefully there is a an available velocity variable corresponding to the base URL.
Workaround for JIRA 5.2.11:
- Add the following source code in issuementioned.vm like here:
#disable_html_escaping() <head> <base href="${baseurl}"> </head> #parse("templates/email/html/includes/header.vm") <tr valign="top"> <td id="email-banner" style="padding:32px 32px 0 32px;"> #set ($authorLink = "#authorlink2($remoteUser.name $linkstyle)") #set ($issueType = $issue.getIssueTypeObject()) #set ($issueLink = "#renderIcon(${issueType.iconUrlHtml} ${issueType.getNameTranslation($i18n)}) <a style='color:${textLinkColour};text-decoration:none;' href='${baseurl}/browse/${issue.getKey()}'>$issue.getKey()</a>") #emailbanner($remoteUser "jira.mentions.email.header" $authorLink $issueLink '') </td> </tr> #if ($comment) <tr valign="top"> <td id="email-fields" style="padding:0 32px 32px 32px;"> <table border="0" cellpadding="0" cellspacing="0" style="padding:0;text-align:left;width:100%;" width="100%"> <tr valign="top"> <td id="email-gutter" style="width:64px;white-space:nowrap;"></td> <td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> #parse("templates/email/html/includes/fields/comment.vm") #parse("templates/email/html/includes/mention-actions.vm") </table> </td> </tr> </table> </td> </tr> #end #parse("templates/email/html/includes/footer.vm")
- Restart JIRA.
To find the Email Velocity files, please read Customizing Email Content article.
Attachments
Issue Links
- is duplicated by
-
JRASERVER-33496 Issues created with attached images, referred to with wiki markup are not rendered correctly in email notifications
- Closed
-
JRASERVER-39862 Attachment links in emails do not contain base url
- Closed
- relates to
-
JRASERVER-12192 Manual mail queue flush causes broken image links in HTML e-mails
- Closed
- mentioned in
-
Wiki Page Loading...