Skip to Content.
Sympa Menu

en - More errors in html_summary (V3 version)

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Mark Valiukas <address@concealed>
  • To: address@concealed
  • Subject: More errors in html_summary (V3 version)
  • Date: Mon, 16 Feb 2004 13:46:36 +1100

Mark Valiukas wrote:

Whoops...

Found an error. Or two. Or three...
They're mentioned here for the benefit of anyone
who's been following this.

Whoops again...
do NOT use my patches for V3 without some additional changes.
Bad things happen when you get a message ID with lots of
percentage signs in it after encoding. These caused
parser to do strange things under some circumstances.

For those interested in such things, the message ID
line of the offending message was:

Message-ID: <003201c3f1f1$86a0e6d0$84669f8c@WENDYN>

Yeah, I know it looks odd - it came out of Outlook.

My lovely new feature, three days after going live,
spewed forth an almost 5 Meg message to nearly 3000
people. Fortunately, most of them don't know my
phone extension...

If anyone is playing with this code, then the following
options are worth trying:


1 - working around the issue. It seems to be a double-escaping issue, so in List.pm
change:
## Clean up Message-ID
$msg->{'message_id'} =~ s/^\<(.+)\>$/$1/;
$msg->{'message_id'} = &tools::escape_chars($msg->{'message_id'});

to:
## Clean up Message-ID
$msg->{'message_id'} =~ s/^\<(.+)\>$/$1/;
$msg->{'de_message_id'} = $msg->{'message_id'};
$msg->{'message_id'} = &tools::escape_chars($msg->{'message_id'});

and use de_message_id where you would use message_id in
both html_summary.tpl and html_summary.plain.tpl



2 - Since this seems to be an issue because I am
calling parser directly, don't.

Add the following into the definition of $param at the top of
sub send_msg_digest:
'boundary3' => '----------=_'.&tools::get_message_id($robot)
(I chose boundary3 as it won't clash with what it being used in
the digest template when we move to V4)

Uncomment the following line:
$self->send_file('html_summary', \@tabrcpthtmlsummary, $robot, $param);
and comment out or delete everything from there to the end
of the send html summary section

This uses a single template, like my V4 version does.
However, one small change is needed to the template
- "msg_list" needs to be replaced with "msg" wherever
it occurs in the template.

This second approach is the one I've taken,
as we'll be moving to 4 eventually and I'm more
than happy to abandon my byzantine mime creation
code if it's only going to complicate matters and
is not really needed.

I expect this will open a whole new can of worms,
but hopefully they'll be easy enough to round up
(famous last words). I'll be sending some more archived
messages through later today, after cleaning the headers
a little. That should be a big enough can-opener.
I've sent 70 through so far, and they seemed okay.


I've discovered that my clever attempt at reading
from templates in locations other than the list's
directory doesn't seem to work, either. You'll need
a local html_summary.tpl and html_summary.plain.tpl
in the directory of each group you want to use the
format for.

As an added benefit, this is fixed by using the
second approach.




--
Mark Valiukas




Archive powered by MHonArc 2.6.19+.

Top of Page