Hi all,
I have a peculiar problem. Our RT system 4.4.0 is not displaying or rendering newly created tickets via email that is being generated via Wordpress Gravity Forms plugins in proper formatting. The Gravity Forms has an inbuilt option to send the form submission to an email. In this case, when I am putting the RT system email, the formatting in the RT system is in a single line unless the submission contains a new line character. Interestingly, the email submission is being properly formatted (in a table) in my email client. I am not sure why this is the case.
I am new to RT. To me this seems like a rendering issue that is either tied to the site config or a setting in the interface.
Please help me fix this minor bug so the form submissions could be rendered properly in RT.
Please see the screenshot below for both views.
knation
September 3, 2019, 5:27pm
2
The screen shot displayed is what you see on the ticket display page under history?
yes, itâs under the history tab. I cannot figure how to change rendering options if thatâs the case.
knation
September 3, 2019, 5:35pm
4
Are you able to send a snippet of the email source content? if you click the âDownloadâ link next to the transaction you can see the source of the email. In this case, I am curious what the HTML looks like
here you go. It looks like itâs rendering as a Table.
knation
September 3, 2019, 5:38pm
6
If you paste the snippet I will try creating a ticket on my RT
Unable to paste the code snippet for some reason. How do I do it properly without it being rendered?
knation
September 3, 2019, 6:11pm
9
You can indent the block with four spaces or wrap it in ``` or there is the âpre formatted textâ style option
Submitted values are:<br />
<br />
<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA"><tr><td>
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
<tr bgcolor="#EAF2FA">
<td colspan="2">
<font style="font-family: sans-serif; font-size:12px;"><strong>Name</strong></font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20"> </td>
<td>
<font style="font-family: sans-serif; font-size:12px;">John Doe</font>
</td>
</tr>
<tr bgcolor="#EAF2FA">
<td colspan="2">
<font style="font-family: sans-serif; font-size:12px;"><strong>Email</strong></font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20"> </td>
<td>
<font style="font-family: sans-serif; font-size:12px;"><a href='mailto:johndoe@gmial.com'>johndoe@gmial.com</a></font>
</td>
</tr>
<tr bgcolor="#EAF2FA">
<td colspan="2">
<font style="font-family: sans-serif; font-size:12px;"><strong>What are your hobbies?</strong></font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20"> </td>
<td>
<font style="font-family: sans-serif; font-size:12px;">Tango</font>
</td>
</tr>
<tr bgcolor="#EAF2FA">
<td colspan="2">
<font style="font-family: sans-serif; font-size:12px;"><strong>What professional experience do you have?</strong></font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20"> </td>
<td>
<font style="font-family: sans-serif; font-size:12px;">akjskldja sjda<br />
sdashjkd asd<br />
a<br />
a<br />
sdjhaj shd jahsld lakjsdklja klsjd <br />
<br />
new line<br />
<br />
ahshdlaksdkl<br />
<br><br />
line break</font>
</td>
</tr>
</table>
</td>
</tr>
</table><br />
<br />
<br />
<br />
knation
September 3, 2019, 8:33pm
11
See this post: RT eats table-tags in html-emails - #8 by Guadagnino_Cristiano
By default RT scrubs HTML attributes that are not explicitly aloud for security reasons, documenation is here: RT::Interface::Web - RT 4.4.4 Documentation - Best Practical
In your Web_Local.pm callback I think you can get started with this as the content:
package HTML::Mason::Commands;
# Let tables through
push @SCRUBBER_ALLOWED_TAGS, qw(TABLE THEAD TBODY TFOOT TR TD TH);
$SCRUBBER_ALLOWED_ATTRIBUTES{bgcolor} = '^\s*#[a-fA-F0-9]{3,6}\s*';
1;
Thanks. I will try. So for this I need server access? Is there a way to do this via the admin interface?
knation
September 3, 2019, 8:59pm
13
Yes, you need server access to create the new file and you will also want to clear the mason cache and restart your web server
thanks. it seems like there are two options as per RT eats table-tags in html-emails
install HTML::Gumbo module or
push some settings by creating the new file as you suggest
Are these correct instructions for installing module? Extensions - RT 4.2.12 Documentation - Best Practical
I will first try installing the module.
knation
September 3, 2019, 9:04pm
15
HTML::Gumbo can be installed using cpan
it isnât an RT extension
1 Like
knation
September 3, 2019, 9:05pm
16
I would try creating the Web_Local.pm file first you may already have that module installed
1 Like