CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions »
  • CiviVolunteer (Moderators: GinkgoFJG, Michael Z Daryabeygi) »
  • Problems with civiVolunteer
Pages: [1]

Author Topic: Problems with civiVolunteer  (Read 1249 times)

richard_simon_bda

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.3.30
  • PHP version: 5.3.27
Problems with civiVolunteer
February 26, 2014, 01:44:32 pm
Has anyone got any experience with civiVolunteer? I'm running civiCRM 4.4 with Drupal and installed the civiVolunteer extension. When I create an event and try to enable Volunteer Management I get the following error:

"Sorry but we are not able to provide this at the moment.
Not enough data to create volunteer project object."

Any help would be GREATLY appreciated.

Richard Simon
Bermuda

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Problems with civiVolunteer
February 26, 2014, 01:50:31 pm
That sounds like a bug.
Can you enable debug + backtrace on your site and post the backtrace here?
Try asking your question on the new CiviCRM help site.

richard_simon_bda

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.3.30
  • PHP version: 5.3.27
Re: Problems with civiVolunteer
February 27, 2014, 07:48:16 am
Here's the backtrace:

backTrace

#0 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(315): CRM_Core_Error::backtrace()
#1 /home/prestige/public_html/sites/civicrm_extensions/org.civicrm.volunteer/CRM/Volunteer/BAO/Project.php(143): CRM_Core_Error::fatal("Not enough data to create volunteer project object.")
#2 /home/prestige/public_html/sites/civicrm_extensions/org.civicrm.volunteer/CRM/Volunteer/Form/Volunteer.php(167): CRM_Volunteer_BAO_Project::create((Array:4))
#3 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(261): CRM_Volunteer_Form_Volunteer->postProcess()
#4 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(151): CRM_Core_Form->mainProcess()
#5 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(128): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Volunteer_Form_Volunteer), "upload")
#6 /home/prestige/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Volunteer_Form_Volunteer), "upload")
#7 /home/prestige/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Volunteer_Form_Volunteer), "upload")
#8 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(345): HTML_QuickForm_Page->handle("upload")
#9 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(117): CRM_Core_Controller->run()
#10 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(297): CRM_Utils_Wrapper->run("CRM_Volunteer_Form_Volunteer", "Manage Volunteer", NULL)
#11 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(72): CRM_Core_Invoke::runItem((Array:14))
#12 /home/prestige/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#13 /home/prestige/public_html/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:4))
#14 [internal function](): civicrm_invoke("event", "manage", "volunteer")
#15 /home/prestige/public_html/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:3))
#16 /home/prestige/public_html/index.php(21): menu_execute_active_handler()
#17 {main}

Sorry but we are not able to provide this at the moment.
Not enough data to create volunteer project object.

GinkgoFJG

  • Moderator
  • I post frequently
  • *****
  • Posts: 135
  • Karma: 4
    • Ginkgo Street Labs
Re: Problems with civiVolunteer
March 01, 2014, 07:40:32 pm
Hi, Richard,

Not sure what's going on, and I'm not able to recreate it on CiviCRM 4.4.4 and CiviVolunteer 1.3. What's the full version number of your CiviCRM instance?

If you're willing to do a little debugging, I might be able to help you more. In org.civicrm.volunteer/CRM/Volunteer/BAO/Project.php, search for:
Code: [Select]
static function create(array $params) {

Add a new line at the very top of the function.
Code: [Select]
var_dump($params); die();

Paste that back in here and maybe we'll see where things are going wrong. Because we're dumping data to the screen, it'd be preferable to do this on a copy of your site rather than your live site.
Are you a CiviVolunteer user? Join the CiviVolunteer 2.0 Matching Grant effort to help the project win $15,000 in grant funding.

GinkgoFJG

  • Moderator
  • I post frequently
  • *****
  • Posts: 135
  • Karma: 4
    • Ginkgo Street Labs
Re: Problems with civiVolunteer
March 01, 2014, 07:42:00 pm
PS: Can someone please move this thread to the CiviVolunteer forum? I don't have forum superpowers.
Are you a CiviVolunteer user? Join the CiviVolunteer 2.0 Matching Grant effort to help the project win $15,000 in grant funding.

richard_simon_bda

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.3.30
  • PHP version: 5.3.27
Re: Problems with civiVolunteer
March 04, 2014, 06:07:23 am
I am using civiCRM 4.4.4. The site is still under development so no problem debugging.

Here's what I got when I plugged in the line of code:

array(4) { ["entity_id"]=> NULL ["entity_table"]=> string(13) "civicrm_event" ["is_active"]=> string(1) "1" ["target_contact_id"]=> string(1) "1" }

Hope that this helps and thanks!

R,

GinkgoFJG

  • Moderator
  • I post frequently
  • *****
  • Posts: 135
  • Karma: 4
    • Ginkgo Street Labs
Re: Problems with civiVolunteer
March 07, 2014, 03:10:12 pm
That's very interesting. The event ID isn't getting passed along for some reason. Must be some strange edge case.

Try this and let me know if it fixes it. If it does, we'll put it in 1.4.

Open up org.civicrm.volunteer/CRM/Volunteer/Form/Volunteer.php. There's a function called postProcess which starts at around line 134. About 8 lines in, you'll see $params['entity_id'] is set to $this->_id. Change $this->_id to $form['id']. You'll end up with this:

Code: [Select]
    $params = array(
      'entity_id' => $form['id'],
      'entity_table' => CRM_Event_DAO_Event::$_tableName,
    );
Are you a CiviVolunteer user? Join the CiviVolunteer 2.0 Matching Grant effort to help the project win $15,000 in grant funding.

richard_simon_bda

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.3.30
  • PHP version: 5.3.27
Re: Problems with civiVolunteer
March 08, 2014, 07:08:29 pm
Did what you asked. Same problem. Here's the error (same as before):

array(4) { ["entity_id"]=> NULL ["entity_table"]=> string(13) "civicrm_event" ["is_active"]=> string(1) "1" ["target_contact_id"]=> string(1) "1" }

Tried creating another event, just in case but got the exact same error.

Should I try uninstalling civiVolunteer and then reinstalling?

GinkgoFJG

  • Moderator
  • I post frequently
  • *****
  • Posts: 135
  • Karma: 4
    • Ginkgo Street Labs
Re: Problems with civiVolunteer
March 10, 2014, 03:47:30 pm
I think it's highly unlikely un/re-installing CiviVolunteer is going to resolve the problem for you. I don't think this is a problem with CiviVolunteer per se, but if you want to find me on IRC we can chat some more. I think I can help you more if I can get access to your box or if you can get me a copy of your site/DB.
Are you a CiviVolunteer user? Join the CiviVolunteer 2.0 Matching Grant effort to help the project win $15,000 in grant funding.

richard_simon_bda

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.3.30
  • PHP version: 5.3.27
Re: Problems with civiVolunteer
March 12, 2014, 10:31:02 am
You're right! The uninstall/reinstall made no difference. I'll watch for you on IRC. Thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions »
  • CiviVolunteer (Moderators: GinkgoFJG, Michael Z Daryabeygi) »
  • Problems with civiVolunteer

This forum was archived on 2017-11-26.