Closed (fixed)
Project:
Email Field
Version:
7.x-1.0-alpha2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2010 at 19:23 UTC
Updated:
3 Feb 2011 at 09:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
ckuhar commentedsame 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;
}
Comment #2
Nephele commentedI'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.
Comment #3
Nephele commentedI'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
Comment #4
iknowbryan commentedIs there a patch for the drupal 6 version??
Comment #5
robash commentedPatch in #3 works for me. Thanks Nephele.
Comment #6
mh86 commentedpatch from #3 has been committed to the current dev version.
thanks for your work