Set up a Bulk Operations View with User name and User Email

Errors pops up on the Confirmation page and Also, the emails are not passing through.

warning: Invalid argument supplied for foreach() in /home/elance75/public_html/sites/all/modules/views_send/views_send.module on line 257.
warning: Invalid argument supplied for foreach() in /home/elance75/public_html/sites/all/modules/views_send/views_send.module on line 428.

Appreciate any help on this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iko’s picture

same problem here..

On "review & confirm" page, the "to" field is empty.

The mail is sent.

jyg’s picture

And for me as well... 3 weeks later, doh.

[edit]

Seems that the latest available version of VBO and Views Send are not compatible

Views Bulk Operations 6.x-1.x-dev 2011-Jul-14
Views Send E-mail 6.x-1.x-dev 2011-Jun-03
[/edit]

[edit #2]

Confirmed. I downgraded VBO to 6.x-1.10 2010-Oct-06 and it works fine... minus a few snazzy options in the dev version.

[/edit #2]

Marko B’s picture

#2 Solved it for me also.

steinmb’s picture

Priority: Normal » Critical

If it is not working then it is critical.
Views Send 6.x-1.x-dev (2011-jun-03)
Views Bulk Operations (VBO) 6.x-1.10

steinmb’s picture

Bumping the issue

chrisgross’s picture

Same issue here. Using COD and can't downgrade VBO without possibly affecting other COD modules, so it would be nice if this could be fixed in this module if possible.

baff’s picture

same

johne’s picture

For me emails send fine. To box is empty on confirmation page. Same error messages as listed above Using:
Views Bulk Operations (VBO) 6.x-1.11
Views Send 6.x-1.x-dev (just downloaded and installed a few days ago 10-1 or 10-2)

Everything was fine with VBO 1.10. Problems started when we had to upgrade due to a security vulnerability to 1.11

richH’s picture

same same.

VBO 6.x-1.12
views_send-6.x-1.x-dev

Thanks
Rich

crehnelt’s picture

I'd love to use this module - exactly what I need!
But there is the same problem.
VBO 6.x-1.12
views_send-6.x-1.x-dev
It would be nice if this could be fixed - PLEASE
Thanks a lot!

barkingtiger’s picture

Found changing:
$records =& $form_state['storage'][1]['objects']['selection'];

to

$records =& $form_state['storage']['selection'];

on both lines, passes the mails across. Now I'm not an expert by any stretch of the imagination so I wouldn't rely on it as such but seems to work here.

crehnelt’s picture

unfortunately not working in my setting!
VBO 6.x-1.12
views_send-6.x-1.x-dev

Error message:
No rows were processed:
Skipped Send mass mail on system id because it was not found.

Hope for any solution!
Thanks
Chris

Marko B’s picture

I tried latest VBO dev and 1.12 version not working with views send, i'll downgrade to vbo 1.10

kevinquillen’s picture

Tried #11, did not fix the problem for me with latest version of VBO.

Marko B’s picture

Just downgrade for now if that is an option.

kevinquillen’s picture

I did.

fmesco’s picture

Priority: Critical » Normal

Same problem here.

There's no way to confirm who we're sending to because we can't see recipients in the "To" field in the Review and Confirm page. The email is sent however, we just hope it's going out to the selected users and no one else.

Subscribing.

kevinquillen’s picture

There is also a problem if you use Amazon SES to send email. Views Send puts headers in that are not accepted by Amazon SES. I had to use a hook_mail_alter to remove Errors-To, Priority, and Precedence from the message headers.

Seems like an API change in newest VBO is causing this module not to work.

mradcliffe’s picture

Priority: Normal » Critical
Status: Active » Needs review
FileSize
2.86 KB

There are a couple issues introduced from VBO 6.x-1.11, and this patch will fix them.

  1. VBOs constants changed
  2. _views_bulk_operations_adjust_selection() was rewritten/removed. I am not sure if this step is still necessary, but I kept the module maintainers intentions with the code that wasn't working in views_send.

This should fix this issue as well as #1227616: Invalid argument supplied for foreach() on line 257 and line 428 with VBO 6.x-1.11. I have tested it on a cod install.

Instructions

git clone http://git.drupal.org/project/views_send
cd views_send
git checkout -b 6.x-1.x --track origin/6.x-1.x
wget http://drupal.org/files/0001-Fixes-issues-1227616-and-1200584-with-Views...
git am 0001-Fixes-issues-1227616-and-1200584-with-Views-Bulk-Ope.patch

Anonymous’s picture

Anonymous’s picture

Status: Needs review » Active

patch #19 is working, mails are received from recipients.
The problem (critical) is that if I set a bcc: name@domain.tld into the Additional E-mail options - Additional headers field the bcc address receives ONE message for EACH passed row from vbo. It means if I sent to 100 rows I'll receive 100 copies of the same message. This really make no sense.
I don't know if this strange behavior is coming from the original views_send.module, because I can't use the original version.
Any Idea to solve this issue?

mradcliffe’s picture

views send works by queueing up the e-mails and sending a separate e-mail to each recipient. If you add yourself to the BCC, you will also get each separate e-mail.

You can check recent log messages over time to see how many got sent at each cron run.

Thanks for testing my patch!

Anonymous’s picture

I'd like to BCC the sender's email once per bulk operation, do you have any idea how to accomplish this?

steinmb’s picture

@giorez outside the scope of this issue. Do you mind opening a separate issue for this?

Anonymous’s picture

yes sure

roball’s picture

roball’s picture

Status: Active » Reviewed & tested by the community
richH’s picture

Hi,
#19 also works for me
Thanks
Rich

NROTC_Webmaster’s picture

Confirmed working

steinmb’s picture

Also confirm that #19 does it's thing. Could we pls. get this committed?

catofcheshir’s picture

Still does not work after apply the patch fron #19.
VBO 6.12

No errors, but mail does not send, field "To:" in preview is empty, and "No rows were processed:" message happens.

upd. Finally it works. In views need to:
- set "Use AJAX" to NO
- set to Not use Batch API
- set to disable "Drupal style "sticky" table headers (Javascript)"
- disable "Override normal sorting if click sorting is used" and "sortable" checkboxes.
- disable "Preserve selection across pages"

At least it works now.

manoloka’s picture

#19 seems to fix the issue as I don't get any errors any more.

However (and I don't know if that is the expected behaviour) the emails weren't sent until a cron was run.

I also would like to point that before #19 the emails also were sent on a cron run (but got the error message above as soon as I hit the send button.)

Is that what I should expect? I think it's fine like this but for some reason I was expecting the first bunch of emails to be sent as soon as I hit the "Send" and the rest (if more than Cron throttle) as per settings.

Thanks,

manoloka’s picture

This note in http://drupal.org/project/views_send answered my question

Note: Messages are queued in a spool table and will are delivered only on cron. You can control how many messages will be send per cron run.

Sorry I didn't notice it before

thekenshow’s picture

Title: Emails from VBO not passing » Patch works but foreach errors being logged

The patch in #19 worked for me on D6.22 with VBO 6.x-1.10 but:

  • The TO: field shows up empty on the Please Confirm page
  • The MESSAGE: field does not reflect HTML (CKEditor) formatting applied when composing the message
  • An "Invalid argument supplied for foreach() in /example/sites/all/modules/contrib/views_send/views_send.module on line 262" error is logged for each recipient.

Also, it made no difference whether or not Batch API, Override normal sorting, or Sticky table headers were enabled or not.

mradcliffe’s picture

Title: Patch works but foreach errors being logged » Emails from VBO not passing

Reverting title change.

druvision’s picture

Status: Fixed » Reviewed & tested by the community

Now it works out of the box.. With the latest version of views_send together with VBO 6.x-1.13, messages are sent without any need for a patch (of course I needed to run cron).

druvision’s picture

Status: Reviewed & tested by the community » Fixed

Status: Reviewed & tested by the community » Closed (fixed)

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

julia.rs’s picture

Status: Closed (fixed) » Active

This still isn't working for me "out of the box". I uninstalled both VBO and Views Send, reinstalled the VBO 6.x-1.13 and the latest version of views_send (dated June 2011), and I'm still getting the for each errors, the To box is empty, and the formatting doesn't display correctly in the message box. Emails are sent successfully, but it's freaking out my users.

Is there something else I need to do to make this work out of the box?

Thank you!

scottrigby’s picture

Status: Active » Reviewed & tested by the community
hansfn’s picture

Assigned: Unassigned » hansfn

I'm really only maintaining the D7 version of this module, but since there is a RTBC patch here I'll try to handle this in the near future.

Marko B’s picture

Please don't leave d6 version hanging, at least on important issues. D7 is still not so good in many departments, missing crucial feat in many contrib. modules and stability, people are still mostly on D6 for most of the sites.

Marko B’s picture

Message to levavie, Error message will still be present as latest version of views send is still from 2011-Jun-03 and you will get this error

    warning: Invalid argument supplied for foreach() in /srv/www/lions.hr/public_html/sites/all/modules/views_send/views_send.module on line 257.
    warning: Invalid argument supplied for foreach() in /srv/www/lions.hr/public_html/sites/all/modules/views_send/views_send.module on line 283.
hansfn’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in commit ce67320.

PS! This commit is based on the patch from mradcliffe in comment 19. Some of the lines copied from VBO wasn't needed.

Marko B’s picture

Great, hope it works. I will test it now.

alibama’s picture

seems to working well = just shot a few emails out. running ultimate cron and had to unlock it at some point. not certain whether this is on views send or on ultimate cron or something the matter with VBO. whatever, it seems to be working

Thanks!

Status: Fixed » Closed (fixed)

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