Internal Server Error - Ticket email body

Moderator: crythias

Post Reply
kookaburra
Znuny newbie
Posts: 9
Joined: 03 Aug 2011, 12:35
Znuny Version: 2.4.7
Real Name: Abhijeet
Location: Pune

Internal Server Error - Ticket email body

Post by kookaburra »

I am getting the following error for a few emails that are part of a ticket.
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@dummy-host.example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
When i checked the iframe of working and non working ticket email, i found that,
The iframe src is : http://localhost/otrs/index.pl?Action=A ... 5;FileID=2
and it gives internal server error..

But to my surprise, if i change the last param manually to FileID=1,
i.e. http://localhost/otrs/index.pl?Action=A ... 5;FileID=1

then the email works!!

What could be the problem? Please help.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - Ticket email body

Post by crythias »

There might be more information in your System Log, but start with: Are you using FS for attachments? Is there a possibility that an attachment might have been deleted manually?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kookaburra
Znuny newbie
Posts: 9
Joined: 03 Aug 2011, 12:35
Znuny Version: 2.4.7
Real Name: Abhijeet
Location: Pune

Re: Internal Server Error - Ticket email body

Post by kookaburra »

Hi crythias
I am using db for storing attachments.
System log also doesn't provide anything on this issue.

I don't understand why it's assigning FileID=2, because FileID=1 works perfectly fine.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - Ticket email body

Post by crythias »

kookaburra wrote:I am getting the following error for a few emails that are part of a ticket.
What does this mean?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kookaburra
Znuny newbie
Posts: 9
Joined: 03 Aug 2011, 12:35
Znuny Version: 2.4.7
Real Name: Abhijeet
Location: Pune

Re: Internal Server Error - Ticket email body

Post by kookaburra »

Please check this screenshot.
Image

As you can see, the body of an email is showing Internal Server Error.
However, it IS ABLE to print it correctly.

I was talking about the "iframe" that is used to put the message body. If that iframe URL contains FileID=2 then the Internal Server Error comes into picture.

In this tickets, there are more than 30 tickets.. but the internal server error occurs only for 3 to 4 tickets starting from ticket no. 26
kookaburra
Znuny newbie
Posts: 9
Joined: 03 Aug 2011, 12:35
Znuny Version: 2.4.7
Real Name: Abhijeet
Location: Pune

Re: Internal Server Error - Ticket email body

Post by kookaburra »

Hello crythias,

More update:
I got it working somehow by writing "LoadInlineContent => 1" on line 184 in AgentTicketAttachment.pm
But i am not sure whether this will break any other functionality.
Basically it is skipping the function "RichTextDocumentSafetyCheck" if i do it.

Should i go ahead with the change? Please let me know your opinion.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - Ticket email body

Post by crythias »

I don't have a lot to say with regard to this. It appears there might be some data corruption or mismatch with regard to attachments. I can't tell as this doesn't appear to be normal. Maybe someone else can help?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Internal Server Error - Ticket email body

Post by MichaelR »

Don't know if you resolved this, but is it just for that ticket? are you getting it in other tickets?
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
kookaburra
Znuny newbie
Posts: 9
Joined: 03 Aug 2011, 12:35
Znuny Version: 2.4.7
Real Name: Abhijeet
Location: Pune

Re: Internal Server Error - Ticket email body

Post by kookaburra »

@MichaelR

When i investigated the code, i found that it was failing in HTMLUtils.pm at the following piece of code.

Code: Select all

# remove style/javascript parts
    if ( $Param{NoJavaScript} && index($EntireString, "<style")>1) {
        $Safety{Replace} ||= ${$String} =~ s{
            <style.+?javascript(.+?|)>(.*)</style>
        }
        {}sgxim;
    }
I skipped this if function and now there is no error.
But i didn't understand why should it fail for that particular ticket.

The problem occurs typically for tickets having more then 25 (approx) emails
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Internal Server Error - Ticket email body

Post by MichaelR »

It's buggering up a javascript path? hmm... It's stripping out javascript calls from the style tag if (I'm assuming) you're not using javascript?

That error only occurs if apache has an issue, I'm stumped... Michael out....
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
Post Reply