Users get the following error message when inputting email address and clicking subscribe?

warning: Missing argument 1 for theme_simplenews_template_mimemail_message() in /home/sites/makakmedia.co.uk/public_html/modules/simplenews_template/simplenews_template.module on line 95

The confirmation email is sent correctly, just annoying the error message appears. I've looked at the previous issue report 132288 and installed 1.1 even though I think I was already using it but the same message still appears?

Comments

TBarregren’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I haven't been able to replicate the bug. Could you please provide me with a detailed step-by-step instruction on how to replicate the bug on a freshly installed Drupal 5 with latest versions of the involved modules.

BTW, I have lowered the priority to normal since this bug is just annoying and doesn't prevent you from using the module. :-)

drupal centric’s picture

I can tell you my theme and my installed modules if that helps:

Drupal 5.1
minnelli theme
block
color
comment
contact
contemplate
drupal
filter
forum
google_analytics
gsitemap
help
legacy
logintoboggan
members
menu
mimemail
node
nodewords
path
pathauto
ping
poll
poormanscron
profile
search
simplenews
simplenews template
statistics
swfobject_api
system
taxonomy
upload
user
user_badges
views
watchdog

I've set up the site in January this year so hopefully using the latest versions of most modules. Is this enough info?

TBarregren’s picture

No, I am sorry, your list of used modules gives me no clue to what is going wrong on your site.

By looking on the code I can tell you what I believe is likely going on on your site:

  • On line 96 (and not on line 95!) theme_simplenews_template_mimemail_message() is called with an empty argument. That tells me that $body is not defined.

  • Since the only place theme_simplenews_template_mimemail_message() is called, if you haven't override it yourself, is on line 134, that tell us that $content passed to phptemplate_mimemail_message() is not defined.

  • phptemplate_mimemail_message() is called on line 158 in mimemail.module, where $body is just passed on from the call to mimemail_prepare().

  • mimemail_prepare() is called on line 173 and 262 in the same module. In both places it is just passed on from the call to mimemail() and mimemail_mail_alter respectively.

Now, the questions are (i) where does these functions get called with an none-defined body argument, (ii) why doesn't that initial call renderer the error, and (iii) why do you get the wrong line number in your error message?

To answering these questions, of which the first must be must important to you I presume, you must provide me with lots of more information.

First of all, I want you to reassure that you are running the latest versions of Drupal and all modules. You can use the Update status module to do that. Don't forget to run update.php! Do you still have the error?

Second, I want you to disable all modules but mimemail, simplenews and simplenews_template. Do you still have the error?

If yes, try to install these modules on a freshly installed Drupal 5 and see if the bug is still there.

If no, enable the other modules one by one. Which modules break your site? Is it only that one or several together?

Finally, write down your findings and give me a detailed account on how to reproduce the bug on a freshly installed Drupal 5 with latest modules.

Looking forward to hear from you.

drupal centric’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Sorry to be a pain Thomas, it's working fine now having installed the Update module and checked the status of my site.

Even though I had downloaded the latest version (I did it twice) of simplenews template and then installed it on my site the error still occurred. Having installed the Update module it was highlighted that I didn't have the latest version and followed the link and installed the version downloaded and hey presto it works!

I've had a lot of trouble with my internet connection lately so possibly it didn't upload correctly originally. Thanks again for all your help. A word to the wise:

Get the Update status module before wasting peoples time!
drupal centric’s picture

Status: Closed (fixed) » Fixed

Fixed

TBarregren’s picture

Dude, it's cool. :-)

Seriously, I am glad it worked out for you.

Anonymous’s picture

Status: Fixed » Closed (fixed)