Possible bug in 3.4.1

Hi guys,

First, thanks for such a great product!

While using rt3 (3.4.1 on linux ) we discovered that when attaching large
(> 1mb) of text file to a ticket, RT3 became awfully slow to display it
because it was trying to display the entire content of the text instead of
only the download link. We also experimented the same behavior while
attaching images.

I read the RT_SiteConfig file and found the MaxInlineBody variable, but it
didn’t seem to work… After playing with different scenarios, I made the
following modification to the code (beware I’m a super newbie Perl
programmer :)))

— ShowTransactionAttachments 2005-02-01 09:20:40.000000000 -0500
+++ /opt/rt3/share/html/Ticket/Elements/ShowTransactionAttachments
2005-04-22 09:52:14.172707752 -0400
@@ -95,7 +95,7 @@

 # If it's text
 if (   $message->ContentType =~ m{^(text|message)}i
  •    && $size <= $RT::MaxInlineBody )
    
  •    && $message->ContentLength <= $RT::MaxInlineBody )
    

    {

       if (
    

@@ -151,7 +151,9 @@
}

 # if it's an image, show it as an image
  • elsif ( $message->ContentType =~ /^image//i ) {
  • elsif ( $message->ContentType =~ /^image//i
  •    && $message->ContentLength <= $RT::MaxInlineImage )
    
  • {
    $m->out(’<img src="’
    . $AttachPath . ‘/’
    . $Transaction->Id . ‘/’

I took the liberty to add a MaxInlineImage variable to the RT_SiteConfig.pm
file. I’m convinced there are much nicer way to fix the problem but this
fix works for me.

From my understanding of the code it seems that the $size variable is
messed up (converted from integer to text for the display of the download
size).

What do you think about this, am I wrong?

[Stéphane Dalton]

While using rt3 (3.4.1 on linux ) we discovered that when attaching large
(> 1mb) of text file to a ticket, RT3 became awfully slow to display it
because it was trying to display the entire content of the text instead of
only the download link. We also experimented the same behavior while
attaching images.

We experience this problem here at my university as well. We haven’t
tested your patch yet, but might get to it soon.

Did you register the problem in URL:http://rt3.fsck.com/? I found
two relevant tickets:

URL:http://rt3.fsck.com/Ticket/Display.html?id=3042
"[rt-users] comment or corresponedence size limit"

URL:http://rt3.fsck.com/Ticket/Display.html?id=6276
"Re: [rt-users] how to disable inline display of attachments"

Both claim to be solved.

[Stéphane Dalton]

While using rt3 (3.4.1 on linux ) we discovered that when attaching large
(> 1mb) of text file to a ticket, RT3 became awfully slow to display it
because it was trying to display the entire content of the text instead of
only the download link. We also experimented the same behavior while
attaching images.

We experience this problem here at my university as well. We haven’t
tested your patch yet, but might get to it soon.

This is logic that I thought we’d fixed for 3.4.2. Are you still seeing
it with 3.4.2?