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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Notice re 'org_info' due to multisite permissioning
Pages: [1]

Author Topic: Notice re 'org_info' due to multisite permissioning  (Read 468 times)

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
Notice re 'org_info' due to multisite permissioning
September 25, 2012, 10:23:02 pm
Hi,

I'm getting many ...
Quote
Notice: Undefined index: org_info in CRM_Contact_BAO_Group::getGroupListSelector() (line 661 of /var/www/citybibleforum/sites/all/modules/civicrm/CRM/Contact/BAO/Group.php).

On line 807 of that file, the code is ...
Code: [Select]
        if ($groupOrg) {
          if ($object->org_id) {
            $contactUrl = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$object->org_id}");
            $values[$object->id]['org_info'] = "<a href='{$contactUrl}'>{$object->org_name}</a>";
          }
          else {
            $values[$object->id]['org_info'] = '';
          }
        }

If $groupOrg is FALSE (the default, unless this is a multisite and the user has permission "administer Multiple Organizations") then the 'org_info' element will be unset and a Notice is generated.

I think the code should be ...
Code: [Select]
        if ($groupOrg && $object->org_id) {
          $contactUrl = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$object->org_id}");
          $values[$object->id]['org_info'] = "<a href='{$contactUrl}'>{$object->org_name}</a>";
        }
        else {
          $values[$object->id]['org_info'] = '';
        }

Ken
« Last Edit: September 25, 2012, 10:37:47 pm by 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: Notice re 'org_info' due to multisite permissioning
September 25, 2012, 10:43:14 pm
On reflection, the change should be ...
Code: [Select]
        if ($groupOrg) {
          if ($object->org_id) {
            $contactUrl = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$object->org_id}");
            $values[$object->id]['org_info'] = "<a href='{$contactUrl}'>{$object->org_name}</a>";
          }
          else {
            $values[$object->id]['org_info'] = '';
          }
        }
        else {
          $values[$object->id]['org_info'] = NULL;
        }

This collapses the "Organisation" column, which makes sense for unpermissioned or non-multisite users
« Last Edit: September 25, 2012, 10:44:45 pm by ken »

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Notice re 'org_info' due to multisite permissioning
September 25, 2012, 11:54:32 pm
Ken that makes sense - wanna file an issue?

As an aside - I never have managed to work out the point of the group_organisation in the multisite. It seems like the original idea was to store information (like address etc) on that org & expose it for tokens - but those things are now domain settings.
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

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: Notice re 'org_info' due to multisite permissioning
September 30, 2012, 01:16:43 am
http://issues.civicrm.org/jira/browse/CRM-10947

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Notice re 'org_info' due to multisite permissioning

This forum was archived on 2017-11-26.