Html "transaction appears to have no content", revisited

Hail RT Devs,

My install of RT3.4 says “transaction appears to have no content”
when replying to tickets with html.

Unfortunately HTML in our outgoing mail is a requirement which I
cannot change and therefore I am unable to fully implement RT.

I tried using demime & stripmime in my mail alias to convert
the mails to plain text but both of them seem to mangle the
message body too harshly and I end up with missing text.

I found the following post in the archives from about a year and half ago
and was wondering if there are any plans to change this feature to a bug
and fix it.

Thanks,
-B>On Tue, Jun 29, 2004 at 02:15:44PM -0400, Todd Chapman wrote:

Clicking on the Reply link for a transaction results in a
message that says: This transaction appears to have no content
The content is HTML, probably badly formed, but displays
properly in the ticket display page.

Not so much a bug as a feature we haven’t gotten to yet. We can display
html inline, but don’t yet strip it for replies if it’s a text/html part
rather than a multipart/mixed.

What about fixing the html with htmltidy and then demime?

http://tidy.sourceforge.net/On Mon, Dec 12, 2005 at 10:44:19AM -0800, Brian Benson wrote:

Hail RT Devs,

My install of RT3.4 says “transaction appears to have no content”
when replying to tickets with html.

Unfortunately HTML in our outgoing mail is a requirement which I
cannot change and therefore I am unable to fully implement RT.

I tried using demime & stripmime in my mail alias to convert
the mails to plain text but both of them seem to mangle the
message body too harshly and I end up with missing text.

I found the following post in the archives from about a year and half ago
and was wondering if there are any plans to change this feature to a bug
and fix it.

Thanks,
-B

On Tue, Jun 29, 2004 at 02:15:44PM -0400, Todd Chapman wrote:

Clicking on the Reply link for a transaction results in a
message that says: This transaction appears to have no content
The content is HTML, probably badly formed, but displays
properly in the ticket display page.

Not so much a bug as a feature we haven’t gotten to yet. We can display
html inline, but don’t yet strip it for replies if it’s a text/html part
rather than a multipart/mixed.


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at http://bestpractical.com/services/training.html

Well i also face same problem in RT 3.4.1, even it has text/plain part
in message. I looked code of ContentObj method in Transaction_Overlay.pm
According to code it just test first attachment in attachment list. And
don’t test rest attachments. I have many transactions those have both
text/plain and text/html part and i get ‘no content’ stuff in email
notification.
is this fixed in later versions or still it is same ?

Nadeem.

[Code=RT/Transaction_Overlay.pm/ContentObj]
sub ContentObj {

my $self = shift;

# If we don\'t have any content, return undef now.
unless ( $self->Attachments->First ) {
    return (undef);
}

# Get the set of toplevel attachments to this transaction.
my $Attachment = $self->Attachments->First();

# If it's a message or a plain part, just return the
# body.
if ( $Attachment->ContentType() =~ '^(text/plain$|message/)' ) {
    return ($Attachment);
}

# If it's a multipart object, first try returning the first
# text/plain part.

elsif ( $Attachment->ContentType() =~ '^multipart/' ) {
    my $plain_parts = $Attachment->Children();
    $plain_parts->ContentType( VALUE => 'text/plain' );

    # If we actully found a part, return its content
    if ( $plain_parts->First && $plain_parts->First->Content ne '' ) {
        return ( $plain_parts->First );
    }

    # If that fails, return the  first text/plain or message/ part
    # which has some content.

    else {
        my $all_parts = $Attachment->Children();
        while ( my $part = $all_parts->Next ) {
            if (( $part->ContentType() =~ '^(text/plain$|message/)'

) && $part->Content() ) {
return ($part);
}
}
}

}

[/CODE]

Well i also face same problem in RT 3.4.1, even it has text/plain part
in message. I looked code of ContentObj method in Transaction_Overlay.pm
According to code it just test first attachment in attachment list. And
don’t test rest attachments. I have many transactions those have both
text/plain and text/html part and i get ‘no content’ stuff in email
notification.
is this fixed in later versions or still it is same ?

It’s worth testing out 3.4.5rc2 and 3.5.6. I can’t recall if we’ve fixed this in
3.4 or 3.5. It’s one of em. I just don’t recall if it’s only 3.5.

I was able to resolve my issue by using the Email::StripMIME perl
module. I just followed its suggested usage in a tiny perl script and
piped its output into rt-mailgate.

The devs should consider using it to convert html to text so that
everyone (me) can be happy with it out of the box.

I was able to resolve my issue by using the Email::StripMIME perl
module. I just followed its suggested usage in a tiny perl script and
piped its output into rt-mailgate.

The devs should consider using it to convert html to text so that
everyone (me) can be happy with it out of the box.

Lots of people want lots of different things. I’d love to hear if the
better content-detection algorithm in newer versions of RT does better
for you.