When you click the deny button, you get:

warning: Invalid argument supplied for foreach() in ../modules/volunteer/volunteer.module on line 517.

civcrm 1.2
latest volunteer cvs

CommentFileSizeAuthor
#12 screenshot8.jpeg25.08 KBAmazon
#11 screenshot6.jpeg46.7 KBAmazon

Comments

killes@www.drop.org’s picture

Did you assign a civicrm group for volunteers? Did you create a civicrm profile for volunteers?

killes@www.drop.org’s picture

I've tried it on my test install and ai cannot reproduce it.

onionweb’s picture

Yes I have the groups, profiles and fields defined correctly. An email field is set up with the correct parameters. However it is not visible to logged-in users when volunteering, which perhaps is as intended.

CRM 1.2
mySQL 4.0.x
php 4.3.x

barik’s picture

I also encounter this error when attempting to volunteer as an anonymous user. This occurs with PHP 4.3, Drupal 4.6.3, and CiviCRM 1.2.

warning: Invalid argument supplied for foreach() in /home/barik/public_html/drupal/modules/volunteer/volunteer.module on line 517.

In the volunteer_mail function, cid is blank.

This then causes $volunteer to return crm_core_error, and that's the end of that.

barik’s picture

After further investigation, I believe that the error you are seeing is due to not updating the volunteer.mysql database table. The schema has changed. Applying the new volunteer database schema has eliminated these errors.

Amazon’s picture

Just tested CivicSpace 0.8.2 and got the following error: warning: Invalid argument supplied for foreach() in /Users/kieran/Sites/trunk/modules/volunteer/volunteer.module on line 850.

warning: Cannot modify header information - headers already sent by (output started at /Users/kieran/Sites/trunk/includes/common.inc:384) in /Users/kieran/Sites/trunk/includes/common.inc on line 192.

Checked the database schema and had this:mysql> desc volunteer;
+-------------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+------------------+------+-----+---------+-------+
| nid | int(10) unsigned | | PRI | 0 | |
| wanted | int(3) | YES | | 2 | |
| uid | int(11) | YES | | NULL | |
| message_approve | text | YES | | NULL | |
| message_deny | text | YES | | NULL | |
| message_wait | text | YES | | NULL | |
| message_reminder | text | YES | | NULL | |
| message_follow_up | text | YES | | NULL | |
+-------------------+------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)

mysql> desc volunteer_contact_event;
+-----------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| cid | int(10) unsigned | | PRI | 0 | |
| timestamp | int(10) unsigned | | | 0 | |
| rating | int(2) | YES | | NULL | |
| comments | text | YES | | NULL | |
| nid | int(10) unsigned | | PRI | 0 | |
| stage | int(2) unsigned | YES | | NULL | |
+-----------+------------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

Amazon’s picture

The database schema above is the same as what's in the MySQL file: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/volunteer/vol...

Amazon’s picture

However it is not visible to logged-in users when volunteering, which perhaps is as intended.

-correct we use the email from the user profile automatically so the user does not need to configure it.

Amazon’s picture

volunteer/question_coordinator/1/3

confirmed this error:

warning: Invalid argument supplied for foreach() in /Users/kieran/Sites/trunk/modules/volunteer/volunteer.module on line 540.

warning: Cannot modify header information - headers already sent by (output started at /Users/kieran/Sites/trunk/includes/common.inc:384) in /Users/kieran/Sites/trunk/includes/common.inc on line 192.

When I click on deny volunteer.

Kieran

Amazon’s picture

I did get the email indicating the event was full however.

Thanks for volunteering for new event. Unfortunately the event is full. Please check back for other events.

-admin

http://localhost/~kieran/trunk

Amazon’s picture

StatusFileSize
new46.7 KB

Here's the error image despite the fact that it works.

Amazon’s picture

StatusFileSize
new25.08 KB

When I deny it works, but I get an error page

Here is a screen shot of the second time I went back through the pages

In this image you see denied only once, but the first time I went back there was two messages.

Amazon’s picture

Now fixed.

Amazon’s picture

Status: Active » Closed (fixed)