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) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Recursing when using hook_civicrm_post?
Pages: [1]

Author Topic: Recursing when using hook_civicrm_post?  (Read 928 times)

ijames

  • Guest
Recursing when using hook_civicrm_post?
March 31, 2010, 02:58:43 am
Hi all,

After creating a new event, I'm trying to set a number of custom fields.

I notice when creating an event, there are a number of times the post hook is gone through:

Create Activity
Create Participant
Edit Individual
Edit Profile (For some custom fields yes?)

Now I was capturing the hook on the Create Participant to do some more work at that point which includes:

civicrm_contact_get  (Checking a custom field of an individual)
civicrm_contact_add (updating that field)
civicrm_activity_create

But it seems that it's not making it through this process.

To debug I've been emailing myself debugging statements, but I'm not sure about the program flow.  Is it clobbering hook calls?  It seems like my debugs making it to my email are not complete, as if somehow I've missed some information.

Thanks for your assistance!

James

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Recursing when using hook_civicrm_post?

This forum was archived on 2017-11-26.