Hi .. just noticed something while using this module ..
Some of the entries in my cck email field have been let in with a trailing space bar (cck validation seems to allow this in the email field). When these are in the set of selected nodes to send an email to, a validation error like this appears:
'The field used for recipient's E-mail node_data_field_per_email_field_per_email_email contains 1 invalid E-mail addresses from a total of 139 selected'
Now i realise that input validation would be ideal (though sometimes keeping the forms friendly and forgiving is nice too) but i think the module should be able to deal with a small validation error like this just using the php trim function.
I hope this is simple enough to fix, and thanks for a great module so far!
Paul
Comment | File | Size | Author |
---|---|---|---|
#8 | show_invalid.patch | 1.66 KB | liquidcms |
#6 | views_send-invalid-addresses.module.patch | 1.52 KB | Gabriel R. |
Comments
Comment #1
mzwyssig CreditAttribution: mzwyssig commentedSame issue here, although this might actually be an issue from the CCK email field ?
I opened an issue here : http://drupal.org/node/1040626
Comment #2
DrewMathers CreditAttribution: DrewMathers commentedI got the same error and assumed it was caused by either the CCK Email Field or Views inserting HTML code around the email address. Though I didn't bother to hack the database and look.
The workaround that works for me is to edit the view and select [x] Strip HTML tags in the Views field configuration for the email address field. If this doesn't work for you, change issue status back to active.
Comment #4
Gabriel R. CreditAttribution: Gabriel R. commentedThe issue is still occurring, even when the option Strip HTML tags is enabled on the email field.
I can think of two better ways to deal with this, either:
* Report the incorrect email addresses in the message.
* Go ahead and do it anyway, skipping the incorrect addresses.
Comment #5
Gabriel R. CreditAttribution: Gabriel R. commentedUpdated title for better failover.
Comment #6
Gabriel R. CreditAttribution: Gabriel R. commentedHere's a patch that makes error message more useful, showing the first 100 incorrect addresses and the text [empty] if the address is missing.
Comment #7
Gabriel R. CreditAttribution: Gabriel R. commentedComment #8
liquidcms CreditAttribution: liquidcms commentedbetter patch
Comment #9
styrbaekI just tryed Views Send on a clean install of Drupal 6, and got this error.
Tryed both the .dev and .alpha2 versions and stil got the error.
Get this error when I try to install the patch:
(Stripping trailing CRs from patch.)
patching file views_send.module
Hunk #1 succeeded at 225 (offset -8 lines).
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 257.
1 out of 2 hunks FAILED -- saving rejects to file views_send.module.rej
sdr-omme.dk@webc2:~/web/sandbox/sites/all/modules/views_send$ patch < views_send-invalid-addresses.module.patch
patching file views_send.module
Hunk #1 FAILED at 259.
1 out of 1 hunk FAILED -- saving rejects to file views_send.module.rej
Tryed all this and still get the error:
CCK email field
CCK text field
Global text field in Views
Stripping html
Comment #10
hansfn CreditAttribution: hansfn commentedThe patch is outdated.
Comment #11
styrbaekAm I the only one who still have this problem?
Comment #12
hansfn CreditAttribution: hansfn commentedIf your problem is that fields unexpectedly don't work, see #1630928: Only user email field works in stead. (Comment in that thread - include version of VBO and Views and field type.)
Comment #13
styrbaekThanks, I just posted my solution on the problem on #1630928: Only user email field works
I made a little chance in line 904 om views_send.module
FROM
$views_value = $views_result->{'node_data_field_text_' . $field};
TO
$views_value = $views_result->{'node_data_field_' . $key . '_' . $field};
I all so changed line 320 to fix a problem with Tokens
FROM
$token_values[] = $context['row']->{'node_data_field_text_' . $field_key};
WITH
$token_values[] = $context['row']->{'node_data_'.$field_name.'_'.$field_key};
Comment #14
hansfn CreditAttribution: hansfn commentedThx a lot for finding a solution and posting it in the other thread, but here it's just noise (because it's off-topic).
Comment #15
styrbaekSorry I'll try to remember :-)
Comment #16
hansfn CreditAttribution: hansfn commentedNo more development on the D6 version.