Page MenuHomePhabricator

CiviCRM gid profile error
Closed, ResolvedPublic

Description

@krobinson encountered the following error when searching for a contact ID on CiviCRM.

image.png (1×2 px, 598 KB)

I'm also getting this when I search on CIDs (recent search for CID 13906948; plugged into the top left search box):

I pulled this from CiviCRM.1.7a880382d2e1d80611365ce1.log on civi1002

$Fatal Error Details = array:3 [
  "message" => "The requested Profile (gid=13906948) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to acc
ess this profile. Please contact the site administrator if you need assistance."
  "code" => null
  "exception" => CRM_Core_Exception {#2615
    -errorData: array:1 [
      "error_code" => 0
    ]
    #cause: null
    -_trace: null
    #message: "The requested Profile (gid=13906948) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to acce
ss this profile. Please contact the site administrator if you need assistance."
    #code: 0
    #file: "/srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php"
    #line: 347
    trace: {
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php:347 {
        CRM_Core_BAO_UFGroup::getFields($id, $register = false, $action = null, $visibility = null, $searchable = false, $showAll = false, $restrict = null, $skipPermission = false, $ctype = null, $permissionTyp
e = CRM_Core_Permission::CREATE, $orderBy = '…10', $orderProfiles = false, $eventProfile = false)
        › if (empty($fields) && !$validGroup) {
        ›   throw new CRM_Core_Exception(ts('The requested Profile (gid=%1) is disabled OR it is not configured to be used for \'Profile\' listings in its Settings OR there is no Profile with that ID OR you do n
ot have permission to access this profile. Please contact the site administrator if you need assistance.',
        ›     [1 => implode(',', $profileIds)]
      }
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php:196 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Contact/Selector.php:190 { …}  
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Contact/Form/Search.php:706 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Contact/Form/Search/Advanced.php:32 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/Form.php:712 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php:44 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/Controller.php:355 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php:322 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
      /srv/org.wikimedia.civicrm/drupal/sites/all/modules/civicrm/drupal/civicrm.module:472 { …}
      /srv/org.wikimedia.civicrm/drupal/includes/menu.inc:527 { …}
      /srv/org.wikimedia.civicrm/drupal/index.php:21 { …}
    }
  }
]

Event Timeline

Looks like this is searching for Group IDs rather than Contact IDs. @Eileenmcnaughton do you think something has changed in the UI so that the form field they're used to using for contact ID searches now does a group ID search instead?

Good spot @Ejegg on the ID. I missed that earlier!

greg triaged this task as High priority.Oct 17 2023, 4:48 PM
greg subscribed.

Feels high? Or is it "the big swath of medium"?

I'd go with medium @greg, as it looks like it needs user error to trigger it. @Ejegg figured out that if you put invalid contact IDs into the search it defaults to a group contact search for some reason. You can recreate it by adding a bogus number in the contact ID search. We also recreated it by adding a space after a valid contact ID.

greg lowered the priority of this task from High to Medium.Oct 17 2023, 9:33 PM

Just an update to say this is an intermittent error - I have replicated elsewhere but it is now not happening on prod https://lab.civicrm.org/dev/core/-/issues/4705

(intermittent makes sense as it would have been notified earlier I think)

Ok - not quite intermittent - it depends whether you want for the js action to resolve a contact or hit enter before it has - in the latter case it goes wrong

It also seems to trigger if you paste a valid CID in and hit enter before the autocomplete comes back with a result.

Edit - oops, Eileen had posted the same info

Change 966653 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Port fix for fatal error on search

https://gerrit.wikimedia.org/r/966653

Change 966653 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Port fix for fatal error on search

https://gerrit.wikimedia.org/r/966653

OK, the fix has been deployed. Seems to be working in my tests.

XenoRyet set Final Story Points to 4.