The module correctly works in the preview but when I send the letter it arrives without the template. I have eliminated the images in header and footer and left only the background-color #ffffff but it enters the same thing: OK in the preview but then the dispatch is wrong. How can it be resolved? Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arvinsingla’s picture

I can confirm. Same results, works in the preview, but the resulting email is not affected.

Currently tested with

Simplenews 6.x-1.x-dev 2008-Dec-11
mimemail 6.x-1.x-dev 2008-Sep-21

quadbyte’s picture

What I noticed :

- It works in the preview tab when editing a newsletter.
- It doesn't work if you send a test email
- it works when you send the newsletter.

oneklema’s picture

Category: support » bug
Priority: Normal » Critical

I am also only able to see the custom header/footer for a newsletter when previewing. When the newsletter is sent, as a test or not, the header/footer do not appear.

asak’s picture

Confirming.

For me it doesn't work on the test email, but does work when sending newsletter to subscribers.

oneklema’s picture

I also have similar behavior where the header/footer does not show in the emails. We also had the very strange behavior of email header/footers that had been deleted (i.e., old versions of the header/footer) showing up in the emails/preview. I can't seem to pin down exactly what conditions cause which behavior.

onejam’s picture

Same as all above. Here's the error:

    * warning: Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body() in /sites/all/modules/simplenews_template/simplenews_template.module on line 370.
    * recoverable fatal error: Object of class stdClass could not be converted to string in /sites/all/modules/simplenews/simplenews.module on line 1582.
    * recoverable fatal error: Object of class stdClass could not be converted to string in /sites/all/modules/simplenews/simplenews.module on line 1582.

And the sent email only shows:

Object
<a href="">Unsubscribe from this newsletter</a>
- - - This is a test version of the newsletter. - - -

Newsletter was sent as a test only.

Thanks,

blackeagle’s picture

I think I have the same Problem!

Here is the Error - I don't know what to do....

* warning: Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body() in /var/www/web1222/html/cms/sites/all/modules/simplenews_template/simplenews_template.module on line 370.
* recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/web1222/html/cms/sites/all/modules/simplenews/simplenews.module on line 1555.
* recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/web1222/html/cms/sites/all/modules/simplenews/simplenews.module on line 1555.
* recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/web1222/html/cms/sites/all/modules/simplenews/simplenews.module on line 1555.
* recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/web1222/html/cms/sites/all/modules/simplenews/simplenews.module on line 1555.

zoltansoos’s picture

Confirming:

Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body() in [....]/html/sites/all/modules/simplenews_template/simplenews_template.module on line 370

IvanSandpile’s picture

I had the same error. It seems the $body var is a stdClass but is treated like a string.

I changed the line 1555 to:
$body = strtr($body->body, $variables);

and the errors stopped/ emails came through. Not sure how that will affect the rest of the code though.

michaeldhart’s picture

Subscribing...can confirm the same problem. Fix from #9 removes errors and email goes through but still without header and footer. Header and footer only visible through preview.

kenorb’s picture

Title: It works only on the preview » warning: Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body in simplenews_template.module on line 370
warning: Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body() in /home/xcomkids/public_html/sites/all/modules/contributions/simplenews_template/simplenews_template.module on line 370.

Marked #353828: No Content in Newsletter as duplicate.

Description of issue: http://drupal.org/node/353828#comment-1196385

michaeldhart’s picture

I tried solution from duplicate issue here:
http://drupal.org/node/353828#comment-1196385

this resulted in no email body again. Only the unsubscribe portion at the end of the email was included. I tried this fix both with and without the fix mentioned above. neither worked for me.

airone35’s picture

Footer and header are working for me but the body do not displays.
I try with and without : http://drupal.org/node/353828#comment-1196385 (without there is only "Object" in body, with the body is empty)
and with and without the fix mentionned in #9
It seems that $issue_body variable has no value or is not considered as a string even with the modification
($body = strtr($body->body, $variables);
in simplenews.module (already exists in the last version)

McCool’s picture

Subscribing. Same problem...

jwilson3’s picture

I've tested a handful of different hacks to get 6.x-1.0-beta1 working with simplenews 6.x-1.0-rc4 to no success. It unfortunately looks like simplenews and or mimemail have changed their functionality and the hooks to import the html + header + footer just arent getting into the sent mails.

This basically renders simplenews-template unusable for D6 :/

airone35’s picture

Works for me with simplenews last dev version

kenorb’s picture

Title: warning: Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body in simplenews_template.module on line 370 » Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body in simplenews_template.module on line 370
Component: Miscellaneous » Code
Status: Active » Needs review
FileSize
1.63 KB

It's almost working.

There is header, footer and some content (but I'm not sure if it's the correct one, because I'm using it with node reference).

Please make some testing.
Install the lastest simplenews dev version.
Patch applied from: http://drupal.org/node/353828#comment-1196385 by btsukuda
after some cleaning.

Please test it.

pawel.traczynski’s picture

Any other suggestions/solutions?

kenorb’s picture

Pawle: What kind of suggestion? It still doesn't work? What's the error?

pawel.traczynski’s picture

Kenorb: did you try patching it?
If yes, can you be so generous and send me the patched version of the file?
I'm using Windows platform. I have no possibilities of patching the file.

kenorb’s picture

There is patch version for Windows, or some other tools like WinMerge, Eclipse, TortoiseSVN and some other developent stuff has it.
http://gnuwin32.sourceforge.net/packages/patch.htm
Find a dump in attachment.

pawel.traczynski’s picture

Hey. I tried the patch and for me it's not working. I switched the *.module file with the file from the attachment from previous post.

Without the patch I receive newsletters with "Object" text in place where the message body/content should be - means between the header and footer. Also I get this error:

recoverable fatal error: Object of class stdClass could not be converted to string in /prezenty/sites/all/modules/simplenews/simplenews.module on line 1557.

After patching the simplenews module I get no errors and the "Object" text disapperas from the newsletter emails - but the content doesn't show up. So generally it looks like:
- Header
- Title
- [blank space]
- Footer

Without the patch:
- Header
- Title
- "object" text
- Footer

And of course should be:
- Header
- Title
- Content of the message
- Footer

Kenorb: does the patch works for You? Do you use home.pl as hosting company? I do.
Best regards.

kenorb’s picture

Pawel@
I'm using home.pl as well, but most of Drupal pages I've got on HeartInternet servers (but it's not good enough as well).
But, I'm trying to make it in more difficult way, that user will select the existing template of email and the header and footer will be generated using some dynamic data (like logo of company, etc.)
But I don't know if somebody knows some other modules which can be used to do that this way;/

pawel.traczynski’s picture

Sorry, but i'm unable to help :/ It is complicated...
But if you like see my other fix for the problem with including parameters in the email title.

(for example when someone wants to subscribe to the newsletter and you want the confirmation email to be sent with !site in title)
http://drupal.org/node/332199#comment-1216533

kenorb’s picture

kenorb’s picture

Non-working patch at #17 can be related to this issue: #357799: drupal_render api documentation

kenorb’s picture

Please do not try this patch, try the second one above.

kenorb’s picture

Try this patch.

keesje’s picture

+1 for patch in #28.
Works fine for me.

ratnesh aarohi’s picture

Can somebody help me (a novice) on how to apply the patch in #28?
What exactly do i Do?
Do i open the patch file and copy the contents into "some" file?
Do i copy the contents into the file "simplenews_template.module"
If yes where do i copy or and if not pl guide me approrpitely.

kenorb’s picture

geniekids@
Download, install and follow the instruction here:
http://drupal.org/node/60108
For Windows, type in Google: patch for Windows
See also here: http://drupal.org/node/60179

kenorb’s picture

There is one warning to fix:

warning: reset(): Passed variable is not an array or object in /home/xcomkids/public_html/sites/all/modules/contributions/simplenews_template/simplenews_template.module on line 91.
  $tid = reset($message['params']['context']['account']->tids);
jwilson3’s picture

re: #32, did you check the patch out here: http://drupal.org/node/353828, at the end of comment #4?

cwhitcoe’s picture

I have tried everything is the patch in #28, and I am still getting the problem...

matteo.boria’s picture

+2 for patch in #28.
Works fine for me too.

Simplenews: 6.x-1.0-rc4
Mime Mail: 6.x-1.x-dev
Simplenews Template: 6.x-1.0-beta1
[multilingual site with Internationalization (i18n) 6.x-1.0]

kenorb’s picture

#33: This is the same patch, but modified.
So patch you proposing has the same bug.

TBarregren’s picture

Assigned: Unassigned » TBarregren
Status: Needs review » Fixed

I've applied the patch in #28 (thanks kenorb) and rolled a new beta.

Please notice that the D6 port still contains bugs and other problems.

kenorb’s picture

Issue at #32 you can fix here: #372190: Wrong argument for reset()

Status: Fixed » Closed (fixed)

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

jwilson3’s picture

should this have been automatically closed if its a critical bug?

kenorb’s picture

If it's fixed, why not.
http://drupal.org/node/367289