0

I did a fresh install of Civi4.6.4 on Drupal 7.38 and ran into something I haven't seen before. An organization was set up as ContactID 1. Now when I logout and then login I receive the following:

  • Session opened for "Drupal User 1" (Drupal uid: 1 is now CiviCRM contactID: 2) - then the errors:
  • Role Publish Events (11) should be held by user (1) because they are part of group 5 (contactID: 2)
  • Role Publish Jobs (13) should be held by user (1) because they are part of group 7 (contactID: 2)
  • Initial roles: @roles, roles to add: Array ( ) , roles to remove: Array ( ) , final roles: Array ( [2] => authenticated user [3] => administrator user [11] => Publish Events [13] => Publish Jobs [15] => View Maint [23] => Publish News [24] => View Connects )

Is there a way to change the organization to an individual (though that doesn't seem be a solution based on other questions)? ...is there another way to fix the problem? ...and how did the "organization (default organization)" create the groups?

1

The messages about roles are verbose output from the CiviGroup Roles Sync module (civicrm_group_roles) which are logged in Drupal watchdog. Are you seeing these on screen? They don't indicate a problem, they just record which roles a user is being sync'd with and why.

I don't think it's problematic in itself that contact id 1 is an organization or that user id 1 is linked to contact id 2. The user id will not in general be the same as the linked contact id. The link is initially established based on email address and is then stored in the civicrm_uf_match table in the CiviCRM database.

Re:

how did the "organization (default organization)" create the groups

The messages from civicrm_group_roles are saying that user 1 gets certain roles (Publish Events, Publish Jobs) because the contact that it's linked to, contact id 2 - which I assume is an Individual - is in certain groups (group ids 5, 7).

  • I do see other messages in the log when "roles" are created. Those messages are expected and are flagged as "notice". The messages I'm concerned about (above) are flagged as "errors". I thought that the ContactID: 1 in CiviCRM had to be an individual (and matched with uid 1 in Drupal. I realize that other contact IDs between CiviCRM and Drupal will not necessarily match. – joemaine Jul 3 '15 at 14:35
  • The civicrm_group_roles messages you quoted shouldn't be classified as "error", so that's a bug. Contact id 1 does not have to be an individual and does not necessarily match Drupal user id 1. E.g. I'm currently looking at a development installation where demo contacts were created. Contact id 1 is Default Organization. User id 1 is linked to contact id 203, which was created when uid 1 first logged in, which was after the demo contacts were created. – davejenx Jul 3 '15 at 17:01
  • You may be correct about it being a bug! I logged in as a different user who had the same roles as other user tested. The log message was the same; 2 errors from the same 2 Group <--> Role syncs. Users that have logged in without belonging to either of the groups do not generate an error; just the expected notice. ...with the new CiviCRM "question" format...are bugs reported here or somewhere else? ...has this been reported as a bug? (I'm not sure where to look anymore.) – joemaine Jul 3 '15 at 19:18
  • Bugs are still reported in JIRA: issues.civicrm.org . I haven't found a bug report for this, however I found the commit that introduced the problem: github.com/civicrm/civicrm-drupal/commit/… This has been changed to WATCHDOG_INFO in the latest version of the code: github.com/civicrm/civicrm-drupal/blob/7.x-master/modules/… So it looks as though it has been spotted and sorted out. – davejenx Jul 6 '15 at 11:32
  • Yup, I think this is a duplicate of civicrm.stackexchange.com/questions/3605/… – John Sep 2 '15 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.