Answers.Body: <p>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.</p>
  
  <p>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.</p>
  
  <p>Re:</p>
  
  <blockquote>
    <p>how did the "organization (default organization)" create the groups</p>
  </blockquote>
  
  <p>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).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-03T14:35:01.897Z
Answers.Text: 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.
Answers.UserDisplayName: joemaine
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-03T17:01:43.007Z
Answers.Text: 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.
Answers.UserDisplayName: davejenx
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-03T19:18:18.643Z
Answers.Text: 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.)
Answers.UserDisplayName: joemaine
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-06T11:32:06.340Z
Answers.Text: Bugs are still reported in JIRA: https://issues.civicrm.org/ .
  I haven't found a bug report for this, however I found the commit that introduced the problem: https://github.com/civicrm/civicrm-drupal/commit/c50e085af4618a2e22dff2e0609eb79927551b68
  This has been changed to WATCHDOG_INFO in the latest version of the code: https://github.com/civicrm/civicrm-drupal/blob/7.x-master/modules/civicrm_group_roles/civicrm_group_roles.module
  So it looks as though it has been spotted and sorted out.
Answers.UserDisplayName: davejenx
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-02T11:09:40.543Z
Answers.Text: Yup, I think this is a duplicate of http://civicrm.stackexchange.com/questions/3605/civigroup-roles-sync-errors
Answers.UserDisplayName: John
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-03T09:19:49.480Z
Answers.LastActivityDate: 2015-07-03T09:19:49.480Z
Answers.UserDisplayName: davejenx
Body: <p>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:</p>
  
  <ul>
  <li>Session opened for "Drupal User 1"  (Drupal uid: 1 is now CiviCRM
  contactID: 2) - then the errors:</li>
  <li>Role Publish Events (11) should be held by user  (1) because they are part of group 5 (contactID: 2)</li>
  <li>Role Publish Jobs (13) should be held by user 
  (1) because they are part of group 7 (contactID: 2)</li>
  <li>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 )</li>
  </ul>
  
  <p>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?</p>
  
Tags: <contacts><groups><roles>
Title: Contact ID 1 is an organization and causing errors
ThreadText: # Contact ID 1 is an organization and causing errors
  
  (Asked by: username_0 on 2015-07-03)
  
  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?
  
  **Tags:** contacts, groups, roles
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-07-03. Score: 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).
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_1**: 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.  
  > **username_0**: 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.)  
  > **username_1**: Bugs are still reported in JIRA: https://issues.civicrm.org/ . I haven't found a bug report for this, however I found the commit that introduced the problem: https://github.com/civicrm/civicrm-drupal/commit/c50e085af4618a2e22dff2e0609eb79927551b68 This has been changed to WATCHDOG_INFO in the latest version of the code: https://github.com/civicrm/civicrm-drupal/blob/7.x-master/modules/civicrm_group_roles/civicrm_group_roles.module So it looks as though it has been spotted and sorted out.  
  > **username_2**: Yup, I think this is a duplicate of http://civicrm.stackexchange.com/questions/3605/civigroup-roles-sync-errors  
  
  ---
  
  