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) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Drupal user role / CiviGroup roles update bug
Pages: [1]

Author Topic: Drupal user role / CiviGroup roles update bug  (Read 485 times)

Chasen

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.70
  • PHP version: 5.3.9
Drupal user role / CiviGroup roles update bug
April 12, 2013, 12:01:32 am
Hi Guys,

Just updated my site to 4.3.0 (released ~8 hours ago) and all looks good and green across the board.

However, just noticed a weird bug where I have a few admin users that are part of a specific permission group and one of the users I wanted to add a role called "maint mode" which is just a role that gives only 1 permission: view the site in maintenance mode

Anyway I assigned the role to the user fine, logged in an tested the site as i wanted too, all good, logged out and back in as the admin and tried to remove the "maint mode" role from the user (via the standard edit user profile page in drupal) and when I removed the role and clicked save I'm greeted with a WSOD and this:

Fatal error: Call to undefined function civicrm_api() in /home/<something>/public_html/sites/all/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module on line 618

I can click back and refresh the page and the role is still checked, continue use the other parts of the site fine, it just seems to be when removing the role? I tried running cron and flushing the caches and tried again and got the same error.

I will investigate further and see if I can drill down to the cause.

Thanks,
Chris

EDIT: incidentally, there is no civicrm role sync for this particular user group. As far as i can tell, this particular user is just a drupal user with some special admin permissions and it just for back-end use.
« Last Edit: April 12, 2013, 12:03:40 am by Chasen »

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Drupal user role / CiviGroup roles update bug
April 12, 2013, 12:36:04 am
Without looking at the code I would suggest the function that you see that error in needs an extra bit of code at the start of the function

if(!civicrm_initialize()){
  return;
}

That should load the api / key civicrm functions
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

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: Drupal user role / CiviGroup roles update bug
April 12, 2013, 09:25:32 am

I added the intiialization code for 4.3.1

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) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Drupal user role / CiviGroup roles update bug

This forum was archived on 2017-11-26.