Very frustrating - all emails I get from my webform contact form are blank!

The blank email body issue, once solved by http://drupal.org/node/175084, re-appeared in the latest versions (1.7/1.8, on drupal-5.5). Even if I install version 1.5 - I am still getting blank email bodies.

Please help!

Amnon

CommentFileSizeAuthor
webform.jpg35.47 KBdruvision
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoloDMonkey’s picture

What operating system are you using?
What web server, version?
What database, version?
What version of Drupal?
How did you "install" version 1.5?
Do other emails work?

quicksketch’s picture

I'm also not seeing this on any of the recent versions of Webform (1.7 or higher or 2.x version). I'd start looking at server configuration problems. See if you can receive other emails from Drupal, such as a password reset request.

druvision’s picture

Status: Active » Closed (fixed)

All other emails on the site (password reminders, regular contact forms of the 'contact' module) have blank bodies too.

Other drupal sites on other domains on the same multisite send password reminder emails perfectly. hence, it seemed more like a modules configuration issue or a database configuration issue, and not a hosting issue.

Indeed I've searched my modules - and removed my hacked version of the HTML Mail module, everything started to work.

So I suggest looking if you have any module which implements hook mal_alter and disable it - then see if the issue still exists.

druvision’s picture

Priority: Critical » Normal
Status: Closed (fixed) » Active

not so fast...

I've disabled the htmlmail module.

Indeed, regular email are now fully sent, including the body,
BUT webform emails are not sent at all, which is worse then the previous situation.

So - I've re-enabled htmlmail for the meanwhile, until a solution is found.

sander-martijn’s picture

Version: 5.x-1.8 » 5.x-1.9
Priority: Normal » Critical

i am experiencing the same issue, but don't have htmlmail module or anything else that modifies emails. Emails are coming through blank or with labels but no values and no subject. Tried several different recent versions of webform with same result. Along with file upload being broken webform is essentially a broken module right now for me and my clients as those are the two most important aspects of it.

PieterDC’s picture

I had the same problem (with the same version of webform: 5.x-1.9) after I upgraded the module.
Except: my mails weren't totally blank. Only the part parsed by theme_webform_mail_fields()

I don't have any module implementing hook_mail_alter()
So that couldn't be the cause.

I do have a template file (webform_create_mailmessage_XX.tpl.php) that modifies the mail body.
That template file gets called by a phptemplate_webform_create_mailmessage_XX() function from my theme's template.php
The template file itself calls theme_webform_mail_fields()
When I changed the first argument of that function call from '' to 0 it seemed to be fixed.

I my case I replaced
echo theme_webform_mail_fields('', $formData['submitted_tree'], $node);
with
echo theme_webform_mail_fields(0, $formData['submitted_tree'], $node);

nevets’s picture

I can reproduce this when I change the key from the default number (cid) to a name. By changing webform_load so it uses the form_key when set, otherwise the cid the problem is fixed for me. I changed the set of the component values to

  while ($c= db_fetch_array($result)) {
    $key = $c['form_key'] ? $c['form_key'] : $c['cid'];
    $page->webformcomponents[$key]['cid']= $c['cid'];
    $page->webformcomponents[$key]['form_key']= $c['form_key'] ? $c['form_key'] : $c['cid'];
    $page->webformcomponents[$key]['name']= $c['name'];
    $page->webformcomponents[$key]['type']= $c['type'];
    $page->webformcomponents[$key]['value']= $c['value'];
    $page->webformcomponents[$key]['extra']= unserialize($c['extra']);
    $page->webformcomponents[$key]['mandatory']= $c['mandatory'];
    $page->webformcomponents[$key]['parent']= $c['pid'];
    $page->webformcomponents[$key]['weight']= $c['weight'];
  }

This code replace $c['cid'] as an index to $page->webformcomponents with $key set in the second line from form_key if set, otherwise cid.

Sorry no patch.

quicksketch’s picture

Status: Active » Closed (fixed)

I'm closing up because levavie's original problem was caused by a secondary module. The theming instructions did change between 1.8 and 1.9, but the format should have stayed the same. Things will definitely need to be rethemed going between the 1.x and 2.x versions of the module, as the code has changed significantly between versions. Follow the updated THEMING.txt instructions included with Webform.