Missing argument 3 for _simplenews_template_theme_simplenews_newsletter_body in simplenews_template.module on line 370

hopfrog - December 12, 2008 - 16:08
Project:Simplenews Template
Version:6.x-1.0-beta1
Component:Code
Category:bug report
Priority:critical
Assigned:TBarregren
Status:closed
Description

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

#1

tkamen - December 16, 2008 - 03:06

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

#2

quadbyte - December 21, 2008 - 22:21

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.

#3

oneklema - December 22, 2008 - 20:50
Category:support request» bug report
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.

#4

asak - December 26, 2008 - 13:15

Confirming.

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

#5

oneklema - December 26, 2008 - 13:30

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.

#6

duvien - December 30, 2008 - 22:14

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,

#7

blackeagle - January 7, 2009 - 15:45

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.

#8

zoltansoos - January 7, 2009 - 22:28

Confirming:

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

#9

IvanSandpile - January 9, 2009 - 00:48

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.

#10

doran - January 15, 2009 - 20:46

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.

#11

kenorb - January 16, 2009 - 13:37
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

#12

doran - January 16, 2009 - 22:50

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.

#13

airone35 - January 19, 2009 - 09:11

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)

#14

McCool - January 20, 2009 - 16:00

Subscribing. Same problem...

#15

jrguitar21 - January 20, 2009 - 23:34

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 :/

#16

airone35 - January 21, 2009 - 15:24

Works for me with simplenews last dev version

#17

kenorb - January 21, 2009 - 16:12
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

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.

AttachmentSize
simplenews_template.module.patch 1.63 KB

#18

pawel.traczynski - January 22, 2009 - 19:26

Any other suggestions/solutions?

#19

kenorb - January 23, 2009 - 02:38

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

#20

pawel.traczynski - January 23, 2009 - 11:09

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.

#21

kenorb - January 23, 2009 - 12:25

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.

AttachmentSize
simplenews_template_346264.zip 20.56 KB

#22

pawel.traczynski - January 23, 2009 - 12:51

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.

#23

kenorb - January 26, 2009 - 10:08

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;/

#24

pawel.traczynski - January 23, 2009 - 14:38

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

#25

kenorb - January 26, 2009 - 10:07

#26

kenorb - January 26, 2009 - 13:17

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

#27

kenorb - January 27, 2009 - 01:59

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

AttachmentSize
simplenews_template.module.patch 1.61 KB

#28

kenorb - January 26, 2009 - 13:29

Try this patch.

AttachmentSize
simplenews_template.module.patch 1.62 KB

#29

kees@qrios - January 26, 2009 - 19:01

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

#30

geniekids - January 27, 2009 - 03:55

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.

#31

kenorb - January 27, 2009 - 10:08

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

#32

kenorb - January 27, 2009 - 16:15

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.

<?php
  $tid
= reset($message['params']['context']['account']->tids);
?>

#33

jrguitar21 - January 29, 2009 - 15:27

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

#34

cwhitcoe - January 29, 2009 - 23:10

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

#35

matteo.boria - January 31, 2009 - 06:43

+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]

#36

kenorb - January 31, 2009 - 15:47

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

#37

TBarregren - January 31, 2009 - 20:38
Assigned to:Anonymous» 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.

#38

kenorb - February 10, 2009 - 15:52

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

#39

System Message - February 24, 2009 - 16:00
Status:fixed» closed

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

#40

jrguitar21 - March 19, 2009 - 17:30

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

#41

kenorb - March 23, 2009 - 15:22

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

 
 

Drupal is a registered trademark of Dries Buytaert.