Large chunk of HTML missing in email




Email Notifications
3 years ago
2 years ago


(Reporter: Stuart Charles, Unassigned)





3 years ago
I performed a fresh installation of bugzilla 4.4.6 using the latest Template-Toolkit v2.26 perl library on debian. I am using perl v5.10.1.

All HTML emails were missing a large block from the top of the email from the initial <html> tag all the way down to the first <tr> tag on the table listing the table. As the <table> tag itself was missing, the email was very badly formatted in all email clients.

After a lot of investigation I narrowed down the problem line template/en/default/email/bugmail.html.tmpl line 17

[% Hook.process('start') %]

For some reason, whenever this line was reached, all the previously generated HTML up to and including this line gets removed in the email content.

I rather stumbled across a workaround by wrapping a debug command around it. Not sure why this works but it does. Not an ideal solution though!

[% DEBUG on %]
  [% Hook.process('start') %]
[% DEBUG off %]

And then run
What extensions do you have enabled in Bugzilla?  The Hook.process statement is allowing extensions to do things at that point.  It's possible an extension is overwriting the email up to that point when the extension gets its shot.

Comment 2

3 years ago
Just the default ones that come with the installation, although the disabled file exists in all of them so I actually have no extensions enabled. I did upgrade the DB from bugzilla version 3.6 so not sure if that has an effect?

Just noticed that even with my workaround some of the HTML is missing. This is how the top of the email source looks:

Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Date: Tue, 23 Dec 2014 11:22:57 +0000
MIME-Version: 1.0

<span class=3D"vcard"><a class=3D"email" href=3D"mailto:Stuart.Charles&#64;=
MYWMAILADD.COM" title=3D"Stuart Charles &lt;Stuart.Charles&#64;MYEMAILADD=
XX.COM&gt;"> <span class=3D"fn">Stuart Charles</span></a>
</span> changed
              <a class=3D"bz_bug_link=20
          bz_status_REOPENED "
   title=3D"REOPENED - Test bug Delete me"
   href=3D"">bug 763<=
             <table border=3D"1" cellspacing=3D"0" cellpadding=3D"8">

         <tr> <!-- this is where the HTML content started without the DEBUG commands -->
           <td style=3D"text-align:right;">Priority</td>

and so on until </html>

Comment 3

2 years ago
Nobody else reported or can reproduce this issue. I suspect you indeed have some extension which eats part of the email. I suggest you ask for help using the support mailing-list, see
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.