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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
Pages: [1]

Author Topic: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module  (Read 4118 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
April 14, 2011, 08:19:48 am
Hi,

I encountered this error on 3.4.beta3 when using CiviGroup Roles Sync module. It occurred when registering for an event through the public registration form, where the reg form contains a profile that adds the participant to a group. CiviGroup Roles Sync is configured to add a Drupal role for members of this group.

Fatal error: Call to undefined function civicrm_uf_id_get() in .../sites/all/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module on line 184

Call Stack
#   Time   Memory   Function   Location
1   0.0000   136936   {main}( )   ../index.php:0
2   0.0277   5435840   menu_execute_active_handler( )   ../index.php:18
3   0.0280   5444488   call_user_func_array ( )   ../menu.inc:348
4   0.0280   5444488   civicrm_invoke( )   ../menu.inc:0
5   0.0421   7789096   CRM_Core_Invoke::invoke( )   ../civicrm.module:355
6   0.3227   19437112   CRM_Core_Controller->run( )   ../Invoke.php:223
7   0.3231   19448320   HTML_QuickForm_Page->handle( )   ../Controller.php:284
8   0.3231   19448320   HTML_QuickForm_Controller->handle( )   ../Page.php:103
9   0.3231   19448456   CRM_Core_QuickForm_Action_Upload->perform( )   ../Controller.php:203
10   0.6298   30930456   CRM_Core_QuickForm_Action_Upload->realPerform( )   ../Upload.php:130
11   0.6392   30975496   CRM_Core_Form->mainProcess( )   ../Upload.php:153
12   0.6392   30975496   CRM_Event_Form_Registration_Register->postProcess( )   ../Form.php:250
13   0.6405   30977152   CRM_Event_Form_Registration_Register->processRegistration( )   ../Register.php:1017
14   0.6436   31583112   CRM_Event_Form_Registration_Confirm->updateContactFields( )   ../Register.php:1088
15   0.6441   31594096   CRM_Contact_BAO_Contact::createProfileContact( )   ../Confirm.php:1004
16   0.8111   33809152   CRM_Contact_BAO_GroupContact::addContactsToGroup( )   ../Contact.php:1801
17   0.8168   33826136   CRM_Utils_Hook::post( )   ../GroupContact.php:203
18   0.8169   33828160   eval( ''return CRM_Utils_Hook_Drupal::invoke( 4, $op, $objectName, $objectId, $objectRef, $op, \'civicrm_post\' );'' )   ../Hook.php:87
19   0.8169   33828448   CRM_Utils_Hook_Drupal::invoke( )   ../Hook.php(87) : eval()'d code:1
20   0.8170   33835928   civicrm_group_roles_civicrm_post( )   ../Drupal.php:57

The culprit (lines 183-4 in civicrm_group_roles.module):

            // TODO: Does civicrm_uf_id_get() exist in v3 api?
            $uid = civicrm_uf_id_get( $contact_id );

I think we know the answer to that!

Cheers,

Dave J

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: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
April 14, 2011, 10:50:51 am

fixed. will be part of the next release.

We'll migrate the civicrm code base to using v3 of the api for the 4.1 release

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

miko

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 2
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.77
  • PHP version: 5.2.11
Re: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
May 11, 2011, 08:17:00 am
Donald- can you fix MY issue?  :)  It's almost exactly the same.

I'm using CiviCRM Group Roles Sync with CiviCRM 3.4.1 and I'm getting this error when, on the Drupal Side, I try to edit any user in the synched group "Volunteer Applicant"- I get:

Fatal error: Call to undefined function uf_match_id_get() in /home/soncnv/webapps/dru6/sites/all/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module on line 115

Thanks in advance!

And if there's already a patch, please let me know?

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
May 11, 2011, 04:49:46 pm
Try changing 'uf_match_id_get' to 'civicrm_uf_match_id_get'

miko

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 2
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.77
  • PHP version: 5.2.11
Re: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
May 11, 2011, 05:40:51 pm
THANKS.  I was thinking that also but was kind of leery of messing with someone else's code.  Certainly we want any solution as a patch or bug fix.  But I'll try it.

miko

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 2
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.77
  • PHP version: 5.2.11
Re: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
May 11, 2011, 05:51:01 pm
Yup!  That totally fixed it.  Thanks! Someone should alert the coder- Donald, or you, Ken?

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
May 11, 2011, 11:13:24 pm
I've created a patch and took the liberty of submitting it with issue CRM-8090.

miko

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 2
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.77
  • PHP version: 5.2.11
Re: Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module
May 11, 2011, 11:27:10 pm
Thanks Ken!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • Call to undefined function civicrm_uf_id_get in civicrm_group_roles.module

This forum was archived on 2017-11-26.