Hello

There are no 'default' und 'plain' formatters on the MANAGE DISPLAY page for the 'eMail Field', only 'Email contact form'

And it doesn't work:

Notice: Undefined index: teaser in email_mail_page() (line 238 of /htdocs/sites/all/modules/email/email.module).

Commenting lines 237-241 out ""fix"" this problem

Comments

ckuhar’s picture

same problem in 6.x-1.2, being less pedantic, here is a diff of the fix above (email.module), however different line numbers:
@@ -287,9 +287,7 @@
$types = content_types($node->type);
if (empty($email) ||
!isset($types['fields'][$field_name]) ||
- $types['fields'][$field_name]['type'] != 'email' ||
- ($types['fields'][$field_name]['display_settings']['teaser']['format'] != 'contact' &&
- $types['fields'][$field_name]['display_settings']['full']['format'] != 'contact')) {
+ $types['fields'][$field_name]['type'] != 'email' ) {
drupal_not_found();
return;
}

Nephele’s picture

StatusFileSize
new3 KB

I'm attaching a patch that fixes the identified problems -- the other formatters are now visible, and the undefined index error message won't appear.

However, there's probably more that needs to be done, specifically with the 'Email contact form' formatter. I'm not seeing anything displayed when I test that formatter -- perhaps because the email field I'm testing doesn't correspond to any user (it's on a standard node, rather than on a user page).

Nevertheless, this patch at least makes the module somewhat functional for anyone else who needs a short-term fix.

Nephele’s picture

Assigned: juves » Unassigned
Status: Active » Needs review
StatusFileSize
new4.18 KB

I've now created a more complete patch that fixes all the issues that I'm aware of. Relative to my earlier patch:
* The Email contact form formatter now works -- it displays, clicking on it takes you to the form, and using the form sends an email
* I'm properly fixing the undefined index error message -- so now the code is checking all appropriate fields instead of just making the error message go away

iknowbryan’s picture

Is there a patch for the drupal 6 version??

robash’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #3 works for me. Thanks Nephele.

mh86’s picture

Status: Reviewed & tested by the community » Fixed

patch from #3 has been committed to the current dev version.
thanks for your work

Status: Fixed » Closed (fixed)

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