"Got no ArticleID!" in ArticleCheckPGP.pm (line 32)

Hi all, Looked at our OTRS system recently, and we're getting Software error: Got no ArticleID! at /otrs/bin/cgi-bin/../../Kernel/Output/HTML/ ArticleCheckPGP.pm line 32. We're just looking into this problem on our OTRS installation at the moment. If anyone has any hints, they'd be appreciated; we'll post our findings (and probably a bug report too) when we figure out what the problem is. Kind regards, Alastair. -- http://www.alastairs-place.net

On 5 Oct 2005, at 10:53, Alastair Houghton wrote:
Hi all,
Looked at our OTRS system recently, and we're getting
Software error:
Got no ArticleID! at /otrs/bin/cgi-bin/../../Kernel/Output/HTML/ ArticleCheckPGP.pm line 32.
We're just looking into this problem on our OTRS installation at the moment. If anyone has any hints, they'd be appreciated; we'll post our findings (and probably a bug report too) when we figure out what the problem is.
OK, here's my analysis of the problem: 1. The error refers to the fact that the database contains a ticket that has no corresponding article. 2. This is caused by the failure of the Sendmail.pm module when trying to send an autoresponse during Kernel::System::Ticket's TicketCreate method. Whilst there's code to deal with the case where the article insert fails by deleting the ticket, there is no code to handle the situation where ticket creation fails. 3. We have log messages in our server's syslog at about the time that the e-mails that triggered this problem came in. *BUT* they are all useless because of a problem with SysLog.pm, so: 4. The problem with SysLog.pm is that syslog() doesn't work with wide characters. OTRS does contain a workaround for this (the config. variable LogModule::SysLog::Charset) *however* it seems to default to UTF-8 (D'oh!). 5. Having fixed that issue, we get the actual error message Wide character in print at /otrs/Kernel/System/Email/Sendmail.pm line 67. 6. Looking at Sendmail.pm, we see, on line 66: # set handle to binmode if utf-8 is used but there is no actual code to do this. Now, I'm no Perl expert, but from reading my "Programming Perl" book, it seems to me that the right thing to do is --- Sendmail.pm~ 2004-12-23 21:10:09.000000000 +0000 +++ Sendmail.pm 2005-10-05 11:59:51.000000000 +0100 @@ -64,6 +64,9 @@ # send mail if (open( MAIL, "| $Self->{Sendmail} $Arg")) { # set handle to binmode if utf-8 is used + if ($Self->{ConfigObject}->Get('DefaultCharset') =~ /^utf(-8| 8)$/i) { + binmode MAIL, ":utf8"; + } print MAIL ${$Param{Header}}; print MAIL "\n"; print MAIL ${$Param{Body}}; which tells Perl that the MAIL handle should be using UTF-8. I'll post a bug report momentarily. Kind regards, Alastair. -- http://www.alastairs-place.net
participants (1)
-
Alastair Houghton