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 (Moderator: Donald Lobo) »
  • Undefined funtion crm_uf_get_match_id in v2
Pages: [1]

Author Topic: Undefined funtion crm_uf_get_match_id in v2  (Read 2108 times)

sdybiec

  • Guest
Undefined funtion crm_uf_get_match_id in v2
May 08, 2008, 04:38:08 am
I upgraded successfully from 1.9 to 2.0.2. Now the Drupal Send module fails with this error message when I invoke it's 'send to a friend' function:

Fatal error: Call to undefined function crm_uf_get_match_id() in /home/uaprogre/public_html/modules/send/send.inc on line 733

The Send module uses CiviCRM to capture contact and activity information when anyone sends their favorite articles to friends.

This thread seems to indicate that this function was not removed in 2.0.2: http://forum.civicrm.org/index.php/topic,3008.0.html

What is a good workaround strategy?

This thread offers what looks like workaround code: http://forum.civicrm.org/index.php?action=profile;u=1260;sa=showPosts

function crm_uf_get_match_id ( $ufID ) {
   require_once 'CRM/Core/BAO/UFMatch.php';
    return CRM_Core_BAO_UFMatch::getContactId( $ufID );
}

Would inserting this function into the Send module code fix my problem?

$cott


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: Undefined funtion crm_uf_get_match_id in v2
May 08, 2008, 12:07:41 pm

yes, adding that should help you get past the undefined error. we dont know enough about the send module and the other functions it uses, so you might potentially trip across other deprecated functions

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

sdybiec

  • Guest
Re: Undefined funtion crm_uf_get_match_id in v2
May 13, 2008, 04:44:42 am
For others migrating their Drupal modules that use CiviCRM 1.x contact and activity functions to CiviCRM v2, there's a great example of what needs to be done at:

http://drupal.org/node/243949

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Undefined funtion crm_uf_get_match_id in v2

This forum was archived on 2017-11-26.