Hi,

I'm using buddylist2 and invite and can send the invites out, but when the invitee joins they are sent to an error page saying the following:

Fatal error: Call to undefined function: workflow_ng_invoke_event() in /home/brue/public_html/site/modules/buddylist2/buddy_api_invite/buddy_api_invite.module on line 74

I didn't have the workflow module installed at first but after installing it I still get the same message. I haven't done anything other than simply activate the workflow module. Do I need to set anything up or is there something I need to do to fix this error?

Thanks for any help.

Comments

nodestroy’s picture

hi,

i added a if condition, so that the function is only called when workflow_ng is enabled. that was missing.

    if (module_exists('workflow_ng')) {
      workflow_ng_invoke_event('buddy_api_invite_invite_success', $args['inviter'], $args['invitee']); 
    } 

but if you have installed and enabled workflow_ng it should work anyway, maybe you have to reinstall buddy_api_invite.

you can get the updated file here:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/buddylist2/...

hope that helps

regards,
dominik

Jboo’s picture

I still had the error so I've gone ahead and added the updated file it seems to get past the error now. By adding this function, am I now missing out on a part of the buddylist module?

Thanks for your help Dominik.

Regards,
Justin

nodestroy’s picture

No, the main function of buddy_api_invite is to ensure that inviter and invitee are getting buddies, when invitee joins the page.

that means:
- userA invites userB to the site
- userB joins site
- userA and userB are getting buddies (twoway connection: userA -> userB and userB -> userA)

the workflow_ng event is just an "addon" to allow an action on this event. with workflow-ng you could configure (as an example): when invitee joins the site...send a mail to the admin. or something else.

the function i added, handles the case when workflow_ng is not enabled. (when you enable workflow_ng module the event is triggered & you should not get any error messages)

regards,
dominik

Jboo’s picture

Thanks for explaining that Dominik, and also for your help, it's much appreciated.

Regards,
Justin

nodestroy’s picture

Status: Active » Fixed

i think this is fixed :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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