some broken html code after the mail

kenorb - February 13, 2009 - 13:23
Project:Simplenews Template
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Why after the end of my mail there is some additional HTML?

ke.norb,

Your account at Kids has been activated.

You may now log in by clicking on this link or copying and pasting it in
your browser:
/user/reset/57/1234531155/97b4cb1cdd19c7eb7...
This is a one-time login, so it can be used only once.

After logging in, you will be redirected to
/user/57/edit so you can change your
password.

Once you have set your own password, you will be able to log in to
/user in the future using: username:
ke.norb

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">




cellpadding="0" cellspacing="0">
cellspacing="0">

#1

jerdavis - February 22, 2009 - 01:12
Status:active» postponed (maintainer needs more info)

I'm unable to reproduce, but there have been a few changes that could impact this. Please try the latest snapshot and see if that corrects the issue.

Jer

#2

kenorb - February 27, 2009 - 15:25

It happen as well with latest snapshot.
I'll try to debug it later.

#3

kenorb - March 17, 2009 - 11:16
Status:postponed (maintainer needs more info)» duplicate

Duplicate of: #345246: Two opening body tags

#4

kenorb - March 18, 2009 - 10:41
Project:Mime Mail» Simplenews Template
Version:6.x-1.x-dev» 6.x-1.x-dev
Category:support request» bug report
Status:duplicate» active

It's the same problem, but for different branch.
So the fix should be different.

#5

kenorb - March 18, 2009 - 15:37
AttachmentSize
simplenews_template.module.patch 780 bytes

#6

kenorb - March 25, 2009 - 10:52
Status:active» needs review

#7

sersim - March 26, 2009 - 22:38

This issue can also be fixed changing line 39 (simplenews_template_mail_alter()) in this way:

  } else if (!$processed and substr($message['id'], 0, 11) == 'simplenews_') {

#8

ron_s - May 21, 2009 - 06:09

I tried to use the patch in #5, and did not fix the problem. Here is the email I received when attempting to use the basic Drupal contact form (Mime Mail HTML not used for system messages):

admin sent a message using the contact form at http://www.testsite.com/contact.
Another
test message

Another line 2

Another line 3

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>: </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--

-->
</style>
</head>
<body bgcolor="#ffffff">
<table class="simplenews-template-background" width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0"><tr><td valign="top" align="center">
<table class="simplenews-template-content" width="100%" cellpadding="0" cellspacing="0"><tr><td align="left">

</td></tr></table>
</td></tr></table>
</body>
</html>

#9

kenorb - May 21, 2009 - 09:45

If you saying that 'Mime Mail HTML not used for system messages', so that probably means he is.
#456260: smtp_library variable is not removed when mimemail has been disabled
Even you will disable Mimemail, it will be still sending through Mimemail;)

Did you tried #7 as well?

There is duplicate: #345246: Two opening body tags but for 5.x

I don't remember how I solve that, but there is patch for 5.x that solved this problem on 5.x
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/simplenews_...

#10

franz - October 19, 2009 - 11:24

@kenorb

The patch has to be converted to unix format (dos2unix)

#11

franz - October 19, 2009 - 14:09

... after which, it seems to work =)

#12

franz - November 5, 2009 - 17:07
Status:needs review» fixed

commited on dev.

#13

hanoii - November 13, 2009 - 22:35
Status:fixed» needs work

I don't think this patch is right, has anybody actually confirms this doesn't break the actual module. I just upgraded to beta3 to try out the latest changes on the module and the template from simplenews_template haven't kicked in at all.

I think the code introduced by this patch is actually making the theme function not to be executed properly, as it mainly will make the body of the mail almost never be processed. When is $message['body'] is going to be null?

I think that the solution for the actual problem in this issue might have been addressed by #567604: simplenews_template_mail_alter() is wrongly changing every mail and removing the first letter of plain text notifications, I will try to revert this patch and commit/comment on the behavior of the module

#14

hanoii - November 13, 2009 - 22:53
Status:needs work» fixed

Well, I actually rolled back this patch from CVS, I am almost sure that has not to do with this problem or the duplicate issue. I have tested with simplenews+mimemail+simplenews_template and all seems working fine w/o the patch and not with it. If I am wrong and this is actually needed, please let me know and I'll follow this one further.

#15

System Message - November 27, 2009 - 23:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.