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) »
  • Hook for custom mail merge tokens, missing parameters
Pages: [1]

Author Topic: Hook for custom mail merge tokens, missing parameters  (Read 701 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Hook for custom mail merge tokens, missing parameters
October 04, 2012, 09:33:40 am
I have implemented the hook "civicrm_tokenValues( &$values, &$contactIDs, $job = null, $tokens = array(), $context = null) "  in my module.  This works fine when someone is choosing "Create PDF Letter", using the tokens on a mailing label, or scheduling a mass mail/civimail.

However, if someone chooses the search action "Send Email to Contacts" or clicks the action button for just one contact and chooses "Send an Email"  then the last 2 parameters are empty.    What class/function should I edit to make sure those 2 parameters get filled in in this situation?

Thanks,

   
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Hook for custom mail merge tokens, missing parameters
October 04, 2012, 10:27:26 am

add a

CRM_Core_Error::backtrace( );

in your hook and then u can trace and find out where that function is being called from

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Hook for custom mail merge tokens, missing parameters

This forum was archived on 2017-11-26.