Closed (duplicate)
Project:
Simplenews
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
6 Oct 2009 at 15:08 UTC
Updated:
6 Dec 2009 at 12:34 UTC
I'm using the simplenews module for sending newsletters. When I send a test mail I get a perfectly filled template in my e-mailbox.
But when I send the mail for real to all my contacts. I and they only receive the mark-up from the template(images and etc.) and no content from the fields.
I use print $node->field_nb_content[0]['view'] to write/print all my fields in the template.
Any one, with an idea?
Comments
Comment #1
franzCan you post the full code you used?
Did you load the node before sending?
Does it work without simplenews template (only simplenews)?
Comment #2
Maurice0082 commentedThis is the code of the simplenews-newsletter-body-5.tpl.php (the 5 according to the id of the newsletter)
To answer your questions :)
Yes, the node was always there and with several real mailings it's not working. However the testmailings are correctly reseived.
The last question, sending the newsletter without the template I'm now testing.
Comment #3
Maurice0082 commentedNow it works for me, but only when I do the cron job manual (in drupal or with cron.php)
Still not solved, but one step closer...
You can also check:
- [www.yourdomain.com]/admin/settings/mimemail - settings for html or plain text
- [www.yourdomain.com]/admin/content/node-type/simplenews/display - settings for html or plain text
- try the automatic cron job AND the manual cron job (?)
Comment #4
franzThe markup seems to be that the newsletter was sent in plain format.
The whole issue belongs to Simplenews.
The idea with Simplenews Template is so you DON'T need those files, and can template using the site interface.
Comment #5
sutharsan commentedNote that the template file name must have a format of: simplenews-newsletter-body--.tpl.php and must not be simplenews-newsletter-body-5.tpl.php
Changing status.
Comment #6
BazzeFTW commentedThere is some sort of problem with this. I have the same issue. Test email looks great, real email just includes the header and footer (simplenews template module) but not the body for some reason. In my case the body consisted of only the number 2 (which is the value in one of my cck fields :S). Very strange.
EDIT: yeah, somehow it doesn't take my template file (and yes it is named correctly, because it worked fine last week) :S
Comment #7
sutharsan commentedBazzeFTW: I doubt if this is caused by Simplenews. Disable all other related modules and check the content of the emails. Disable: Mime Mail, HTML mail, SMTP, Simplenews Template, any other Simplenews * modules.
Since nobody can make it likeley that these problems are caused by Simplenews, I change the category to Support.
@maurice: Assigning an issue to yourselve means: 'Hands off, I'm working on it' I hope you do!
Comment #8
BazzeFTW commented@Sutharsan: I disabled them all. Still same issue :/
Comment #9
sutharsan commentedHave you removed any simplenews-body.tpl.php (or other simplenews* template)?
Comment #10
BazzeFTW commentedNope, I haven't removed anything from the simplenews folder. I have a simplenews-newsletter-body--4.tpl.php in my theme map which get parsed fine when sending a test email but not when sending the real one. The real one just prints out the fields you declared in the "Display fields" under the Simplenews tab. The strangest is that it worked just fine last week and I haven't touched the site since then.
Comment #11
sutharsan commentedSee: #374222: Template files do not work when using admin theme
Comment #12
BazzeFTW commentedI already know about that, I have all my tpl in the correct place. But you can't possibly mean that the theme() function will include the tpl files from one directory when sending the test-email and another one when sending the real one? I've even tried putting all the tpl files for the newsletter in all my theme folder just in case.
Comment #13
BazzeFTW commentedOkay, I applied this patch: http://drupal.org/files/issues/simplenews.d6_256795_4.patch and now it works.
Comment #14
sutharsan commentedSo it turns out this is a duplicate of #256795: Allow simplenews cron to send nodes that anonymous users cannot access.
[edit]: wrong comment removed.