Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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">
Comment | File | Size | Author |
---|---|---|---|
#5 | simplenews_template.module.patch | 780 bytes | kenorb |
Comments
Comment #1
jerdavisI'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
Comment #2
kenorb CreditAttribution: kenorb commentedIt happen as well with latest snapshot.
I'll try to debug it later.
Comment #3
kenorb CreditAttribution: kenorb commentedDuplicate of: #345246: Two opening body tags
Comment #4
kenorb CreditAttribution: kenorb commentedIt's the same problem, but for different branch.
So the fix should be different.
Comment #5
kenorb CreditAttribution: kenorb commentedComment #6
kenorb CreditAttribution: kenorb commentedComment #7
sersim CreditAttribution: sersim commentedThis issue can also be fixed changing line 39 (simplenews_template_mail_alter()) in this way:
Comment #8
ron_s CreditAttribution: ron_s commentedI 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):
Comment #9
kenorb CreditAttribution: kenorb commentedIf you saying that 'Mime Mail HTML not used for system messages', so that probably means he is.
#456260: WSOD: 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_...
Comment #10
franz@kenorb
The patch has to be converted to unix format (dos2unix)
Comment #11
franz... after which, it seems to work =)
Comment #12
franzcommited on dev.
Comment #13
hanoiiI 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
Comment #14
hanoiiWell, 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.
Comment #16
roball CreditAttribution: roball commentedI am using the latest 6.x-1.x-dev version (2009-Nov-14), together with Simplenews 6.x-2.x-dev (2009-Dec-10) and Mime Mail 6.x-1.0-alpha1. The HTML part of the body of the mails sent by Simplenews looks like this:
Comment #17
hanoiiHave you override any theme function in your theme? Can you try the functionality with a default garland theme?
Thanks,
a.=
Comment #18
roball CreditAttribution: roball commentedNo, I did not override a theme function. The problem also occurs with the default Garland theme:
Comment #19
roball CreditAttribution: roball commentedIn the meantime, I have uninstalled the "Simplenews Template" module and now use the "simplenews-newsletter-body--[tid].tpl.php" and "simplenews-newsletter-footer--[tid].tpl.php" files directly from the "Simplenews" module. This solved the problem, so it seems to be caused by "Simplenews Template".
Comment #20
smk-ka CreditAttribution: smk-ka commentedThere is definitely something fishy going on when using the combination of simplenews, simplenews_template and mimemail. Both simplenews_template (during
hook_mail_alter()
) and mimemail (when finally sending the email in itsdrupal_mail_wrapper()
implementation) wrap the email into a HTML structure, resulting in duplicated markup. I did only a short test, but eventually I disabled simplenews_template altogether and styled the email purely using mimemail's mimemail-message.tpl.php, which works if your email style may be applied to all outgoing emails (not just newsletters). However, some of the advanced features of simplenews_template, like preventing simplenews from inserting its title, are then not available.I'm not sure what's the correct solution here, but since mimemail provides the HTML wrapping, I think simplenews_template should maybe avoid outputting its own markup scaffold.
An alternative solution might be simplenews_template still outputs full HTML and implements its own incarnation of mimemail_message.tpl.php based on
mailkey
, which simply passes the email through (i.e. to avoid adding markup again). But then again, it was only a short test.Comment #21
webavant CreditAttribution: webavant commentedtheme_simplenews_template_content() is being called for me, and I confirmed because I was able to eliminate the
that is inserted in the module's function, but the tag is still inserted regardless that I removed it from my theme function. I imagine this has something to do with the way the theme engine works, but I just don't know.Comment #22
kenorb CreditAttribution: kenorb commentedDrupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.