# Question
Title: Version 5.31.0 seems to break the CiviCase Extension
We have the CiviCase (uk.co.compucorp.civicase) extension on our site. It's updated to the latest commit (52d0fbf31c5f4b4fe2a2523c9cec42bfbbec1e58). It was working fine in 5.30.

However, when I upgrade to 5.31.0, it breaks Case management (clicking on a case from Manage Cases brings up a blank screen, we can't see the activity in a case from the Manage Case screen, etc), and my Firefox console throws a ton of angular.js errors. We also get a SQL error in the Civi log (there is a field missing from the group by of a query, and only\_full\_group\_by is turned on, so that breaks).

The only thing I've done is the upgrade from 5.30 to 5.31.0. No other changes have been made.

Since this is integration between core and an extension, I'm not sure who to bring this up with. So I'm noting it here for now. But if you can point me to the write place to put more details, I'm happy to do that.

Here are some of the console log errors I get (not sure this will help track things down):

```
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 13
    jQuery 7
    api3 crm.ajax.js:109
    Angular 40
    jQuery 8
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 23
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 23
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 21
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 21
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 28
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 26
    jQuery 8
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 26
    jQuery 8
angular.js:99
This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features! a
XHRGEThttps://crm.thespectrumworks.org/civicrm/ajax/rest?entity=Case&action=getdetails&json=%7B%22id%22%3A%2219%22%2C%22return%22%3A%5B%22subject%22%2C%22details%22%2C%22contact_id%22%2C%22case_type_id%22%2C%22case_type_id.case_type_category%22%2C%22status_id%22%2C%22contacts%22%2C%22start_date%22%2C%22end_date%22%2C%22is_deleted%22%2C%22activity_summary%22%2C%22activity_count%22%2C%22category_count%22%2C%22tag_id.name%22%2C%22tag_id.color%22%2C%22tag_id.description%22%2C%22tag_id.parent_id%22%2C%22related_case_ids%22%5D%2C%22case_type_id.case_type_category%22%3A%22cases%22%2C%22api.Case.getcaselist.relatedCasesByContact%22%3A%7B%22case_type_id.case_type_category%22%3A%22cases%22%2C%22contact_id%22%3A%7B%22IN%22%3A%22%24value.contact_id%22%7D%2C%22id%22%3A%7B%22!%3D%22%3A%22%24value.id%22%7D%2C%22is_deleted%22%3A0%2C%22return%22%3A%5B%22case_type_id%22%2C%22start_date%22%2C%22end_date%22%2C%22status_id%22%2C%22contacts%22%2C%22subject%22%5D%7D%2C%22api.Case.getcaselist.linkedCases%22%3A%7B%22case_type_id.case_type_category%22%3A%22cases%22%2C%22id%22%3A%7B%22IN%22%3A%22%24value.related_case_ids%22%7D%2C%22is_deleted%22%3A0%2C%22return%22%3A%5B%22case_type_id%22%2C%22start_date%22%2C%22end_date%22%2C%22status_id%22%2C%22contacts%22%2C%22subject%22%5D%7D%2C%22api.Activity.get.recentCommunication%22%3A%7B%22case_id%22%3A%2219%22%2C%22is_current_revision%22%3A1%2C%22is_test%22%3A0%2C%22activity_type_id%22%3A%7B%22!%3D%22%3A%22Bulk+Email%22%7D%2C%22activity_type_id.grouping%22%3A%7B%22LIKE%22%3A%22%25communication%25%22%7D%2C%22status_id.filter%22%3A1%2C%22options%22%3A%7B%22limit%22%3A5%2C%22sort%22%3A%22activity_date_time+DESC%22%7D%2C%22return%22%3A%5B%22subject%22%2C%22details%22%2C%22activity_type_id%22%2C%22status_id%22%2C%22source_contact_name%22%2C%22target_contact_name%22%2C%22assignee_contact_name%22%2C%22activity_date_time%22%2C%22is_star%22%2C%22original_id%22%2C%22tag_id.name%22%2C%22tag_id.description%22%2C%22tag_id.color%22%2C%22file_id%22%2C%22is_overdue%22%2C%22case_id%22%5D%7D%2C%22api.Activity.get.tasks%22%3A%7B%22case_id%22%3A%2219%22%2C%22is_current_revision%22%3A1%2C%22is_test%22%3A0%2C%22activity_type_id%22%3A%7B%22!%3D%22%3A%22Bulk+Email%22%7D%2C%22activity_type_id.grouping%22%3A%7B%22LIKE%22%3A%22%25task%25%22%7D%2C%22status_id.filter%22%3A0%2C%22options%22%3A%7B%22limit%22%3A5%2C%22sort%22%3A%22activity_date_time+ASC%22%7D%2C%22return%22%3A%5B%22subject%22%2C%22details%22%2C%22activity_type_id%22%2C%22status_id%22%2C%22source_contact_name%22%2C%22target_contact_name%22%2C%22assignee_contact_name%22%2C%22activity_date_time%22%2C%22is_star%22%2C%22original_id%22%2C%22tag_id.name%22%2C%22tag_id.description%22%2C%22tag_id.color%22%2C%22file_id%22%2C%22is_overdue%22%2C%22case_id%22%5D%7D%2C%22api.Activity.get.nextActivitiesWhichIsNotMileStone%22%3A%7B%22case_id%22%3A%2219%22%2C%22status_id%22%3A%7B%22!%3D%22%3A%22Completed%22%7D%2C%22activity_type_id%22%3A%7B%22!%3D%22%3A%22Bulk+Email%22%7D%2C%22activity_type_id.grouping%22%3A%7B%22NOT+LIKE%22%3A%22%25milestone%25%22%7D%2C%22options%22%3A%7B%22limit%22%3A1%7D%2C%22return%22%3A%5B%22subject%22%2C%22details%22%2C%22activity_type_id%22%2C%22status_id%22%2C%22source_contact_name%22%2C%22target_contact_name%22%2C%22assignee_contact_name%22%2C%22activity_date_time%22%2C%22is_star%22%2C%22original_id%22%2C%22tag_id.name%22%2C%22tag_id.description%22%2C%22tag_id.color%22%2C%22file_id%22%2C%22is_overdue%22%2C%22case_id%22%5D%7D%2C%22api.Activity.getcount.scheduled%22%3A%7B%22case_id%22%3A%2219%22%2C%22is_current_revision%22%3A1%2C%22is_deleted%22%3A0%2C%22activity_type_id%22%3A%7B%22!%3D%22%3A%22Bulk+Email%22%7D%2C%22status_id%22%3A%22Scheduled%22%7D%2C%22api.Activity.getcount.scheduled_overdue%22%3A%7B%22case_id%22%3A%2219%22%2C%22is_current_revision%22%3A1%2C%22is_deleted%22%3A0%2C%22is_overdue%22%3A1%2C%22activity_type_id%22%3A%7B%22!%3D%22%3A%22Bulk+Email%22%7D%2C%22status_id%22%3A%22Scheduled%22%7D%2C%22api.CustomValue.getalltreevalues%22%3A%7B%22entity_id%22%3A%22%24value.id%22%2C%22entity_type%22%3A%22Case%22%2C%22return%22%3A%5B%22custom_group.id%22%2C%22custom_group.name%22%2C%22custom_group.title%22%2C%22custom_field.name%22%2C%22custom_field.label%22%2C%22custom_value.display%22%2C%22custom_group.style%22%5D%7D%2C%22api.Relationship.get%22%3A%7B%22case_id%22%3A%2219%22%2C%22return%22%3A%5B%22id%22%2C%22relationship_type_id%22%2C%22contact_id_a%22%2C%22contact_id_b%22%2C%22description%22%2C%22end_date%22%2C%22is_active%22%2C%22start_date%22%5D%2C%22api.Contact.get%22%3A%7B%22contact_id%22%3A%22%24value.contact_id_b%22%7D%7D%2C%22sequential%22%3A1%7D
[HTTP/1.1 200 OK 653ms]

Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 4
    jQuery 8
    Angular 23
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 4
    jQuery 8
    Angular 23
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 3
    jQuery 8
    <anonymous> button.js:110
    <anonymous> button.js:125
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 12
    jQuery 8
    Angular 23
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 12
    jQuery 8
    Angular 23
    jQuery 7
    api3 crm.ajax.js:109
    Angular 14
angular.js:99
GEThttps://crm.thespectrumworks.org/sites/all/modules/civicrm/js/jquery/jquery.crmEditable.js?r=hPZWD
[HTTP/1.1 200 OK 2ms]

XHRGEThttps://crm.thespectrumworks.org/civicrm/ajax/rest?entity=Activity&action=getdayswithactivities&json=%7B%22activity_type_id%22%3A%7B%22!%3D%22%3A%22Bulk+Email%22%7D%2C%22is_deleted%22%3A%220%22%2C%22status_id%22%3A%7B%22IN%22%3A%5B1%2C4%2C7%2C8%2C9%2C10%2C2%5D%7D%2C%22activity_date_time%22%3A%7B%22BETWEEN%22%3A%5B%222020-11-01+00%3A00%3A00%22%2C%222020-11-30+23%3A59%3A59%22%5D%7D%2C%22case_id%22%3A%2219%22%2C%22options%22%3A%7B%22group_by_field%22%3A%22status_id%22%7D%7D
[HTTP/1.1 200 OK 57ms]

Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 13
    jQuery 7
    api3 crm.ajax.js:109
    Angular 6
    jQuery 8
    Angular 13
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 32
    jQuery 7
    api3 crm.ajax.js:109
    Angular 6
    jQuery 8
    Angular 13
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 32
    jQuery 7
    api3 crm.ajax.js:109
    Angular 6
    jQuery 8
    Angular 13
angular.js:99
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 13
    jQuery 7
    api3 crm.ajax.js:109
    Angular 26
    then jQuery
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 10
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 10
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:99
GEThttps://crm.thespectrumworks.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.jeditable.min.js?r=hPZWD
[HTTP/1.1 200 OK 7ms]

Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 10
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 10
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 20
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 20
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:99
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 20
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:15635:15
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.0/$rootScope/infdig?p0=10&p1…%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%5D
    Angular 20
    jQuery 3
    onload Common.js:223
    setTimeout handler*CRM.loadScript/script.onload Common.js:219
    loadScript Common.js:217
    Angular 26
    jQuery 3
angular.js:99

```

# Answer
> 1 votes
It seems ok for me. Did you also update shoreditch? There are a lot of UI changes in core 5.31 that need a recent version of shoreditch.

Angularjs itself was updated in 5.31 - possibly some cached files didn't get cleared. You can also try deleting sites/default/files/civicrm/persist/contribute/dyn which is where angular stuff gets cached.

Regarding full\_group\_by, yeah I have to always turn that off.

---
Tags: extension, civicase, core
---


# Question
Title: GoCardless Direct Debit integration for CiviCRM: will this extension handle 5 year memberships?
CiviCRM 5.31.0 - Wordpress 5.5.3 - PHP 7.3.24

---

I help run an organisation (non-profits) where we have individual memberships, lasting for 1, 2 and 5 years and where subscriptions are being currently collected, mainly through PayPal. We are looking to create a further contribution page(s) to accept direct debits and see this extension as a possible solution. Before trialling it, does anyone know please whether it and GC would cope with memberships of more than 1 year, where of course the interval between DD's could be anything up to 5 years?

# Answer
> 1 votes
I think thats perfectly possible within GoCardless. You would need to setup a plan for each of the differing membership collection periods you would like to collect for in order to use it as a traditional Direct Debit. FYI a Direct Debit is a UK equivelant of SEPA with some technical differences i.e. UK bank accounts only etc.

---
Tags: wordpress, gocardless
---


title: Multi-Select Field No Longer Working

text:
# Question
Title: Multi-Select Field No Longer Working
I have a site I manage that uses a "Multi-Select" HTML field type. I do not use the field so I cannot say exactly how recently but no more than the last month our field stopped being able to be edited or shown in search forms.

If I switch to checkboxes it works perfectly. If I switch back Multi-Select I get the same problem and when I save I get the error, "Please enter valid - Data and Input Field Type."

It is like it is trying to use the pre-CiviCRM 4.5 form element. I do not know how that could be.

I am running CiviCRM 5.28.2 in Drupal 7.

Any help is greatly appreciated.

Thanks, Josh

# Answer
> 1 votes
I could not recreate this. The most simple solution was to make a new field and then import the old data into the new field.

---
Tags: custom-fields
---


# Question
Title: CiviContributions > New Contribution Page with an ANONYMOUS USER and no Login Display in Drupal (CiviCRM 5.25.0 / Drupal 7.70)
This is a multipart question:

**1.** I have added the following permissions for the anon user:

-CiviCRM: profile listings and forms

and

-CiviCRM: access all custom data

My desire is to block any other access to CiviCRM - I just want individuals to access the page and make a donation. Am I missing any security implication?

---

**2.** I have set up a profile to collect First / Last and Email address, but Drupal is still adding a login - this would be confusing to my users and I would like that not to appear, but not sure how to turn off that from displaying:

# Answer
I think 1 will take care of #2

Profile listings and forms are NOT for your public users. Only trusted users. You want to change that one

Here are the permission you need for Anonymous and Authenticed Users

CiviCRM: profile create

CiviCRM: profile edit

CiviCRM: profile view

CiviContribute: make online contributions
> 1 votes

# Answer
Got to Structure -\> Blocks

Find the User Login block and and disable it or control its visibility by specifying Pages you want it to show up on.
> 1 votes

# Answer
This was resolved via the setting for Anon user noted by Iowa boy and the User Login Block noted by Karin. I did not add the options in permissions for Auth Users - did not make any difference to operations.
> 0 votes

---
Tags: civicontribute
---


title: Undefined index: auto-renew

text:
# Question
Title: Undefined index: auto-renew
Upon opening contribution page, we get the following PhP errors showing ABOVE the contribution pages. See JGSNY Contribution Page

**Notice: Undefined index: auto\_renew in /home/jgsny/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Contribute/Form/ContributionBase.php on line 1244**

ALSO:

**Notice: Undefined index: auto\_renew in /home/jgsny/public\_html/administrator/components/com\_civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 847**

Auto-renewal options are off for all contribution pages; database tables have indexes on all relevant pages. Civicrm status shows OK.

Quick answers appreciated - this is membership renewal time and must have membership renewal form working.

Thanks, Kate

# Answer
> 1 votes
For a quick fix, change `$memType['auto_renew']` to `($memType['auto_renew'] ?? 0)` for the first one, and

change `$membershiptTypeValue['auto_renew']` to `!empty($membershiptTypeValue['auto_renew'])` for the second one.

---
Tags: civicontribute, civimember
---


# Question
Title: Possible Bug? Foreign key constraint error on upgrade to 5.31.0 (populating civicrm_relationship_cache)
I've actually already diagnosed and worked around this problem for myself in a fairly large CiviCRM database within a Wordpress install, but thought I'd refer to those more expert here as to whether this error is deserving of a bug report.

On updating CiviCRM 5.28.0 to 5.31.0 I encountered a fatal foreign key error during the database upgrade process. From a user perspective the upgrade appeared to simply hang permanently. No error messages were thrown.

The error related to the population of the new civicrm\_relationship\_cache table introduced in version 5.29.alpha1.

**Expected behaviour**: upgrade DB from 5.28.0 to 5.31.0. User warnings or graceful failure in event of a failed upgrade process.

**Actual behaviour**: upgrade failed at 5.29.0 migrations without showing any errors or explanation to user. Not possible to resolve problems short of some fairly significant code exploration and SQL gymnastics.

The CiviCRM log did record the details:

```
Nov 21 22:45:53  [info] Running task: Upgrade DB to 5.29.alpha1: Fill civicrm_relationship_cache (3 => 5002)

Nov 21 22:45:53  [error] $Fatal Error Details = Array
(
    [callback] => Array
    (
        [0] => CRM_Core_Error
        [1] => exceptionHandler
    )

[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_relationship_cache (relationship_id, relationship_type_id, orientation, near_contact_id, near_relation, far_contact_id, far_relation, start_date, end_date, is_active)
SELECT rel.id, rel.relationship_type_id, "a_b", rel.contact_id_a, reltype.name_a_b, rel.contact_id_b, reltype.name_b_a, rel.start_date, rel.end_date, rel.is_active
FROM civicrm_relationship rel
INNER JOIN civicrm_relationship_type reltype ON rel.relationship_type_id = reltype.id
WHERE (rel.id >= 3 AND rel.id <= 5002)
ON DUPLICATE KEY UPDATE relationship_type_id = rel.relationship_type_id, near_contact_id = rel.contact_id_a, near_relation = reltype.name_a_b, far_contact_id = rel.contact_id_b, far_relation = reltype.name_b_a, start_date = rel.start_date, end_date = rel.end_date, is_active = rel.is_active
 [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`cdhalton-network-civi`.`civicrm_relationship_cache`, CONSTRAINT `FK_civicrm_relationship_cache_near_contact_id` FOREIGN KEY (`near_contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE C)]

```

To get around the problem, I had to do the following, which probably has a similar effect as running the SQL with foreign key checks turned off, but won't enter duplicate rows.

1. In MySQL client (eg PHPMyAdmin) run the 'inner' select mentioned in the error during the failing upgrade query to get the data that needs to be populated to the new civicrm\_relationship\_cache table. `SELECT rel.id, rel.relationship_type_id, "a_b", rel.contact_id_a, reltype.name_a_b, rel.contact_id_b, reltype.name_b_a, rel.start_date, rel.end_date, rel.is_active FROM civicrm_relationship rel INNER JOIN civicrm_relationship_type reltype ON rel.relationship_type_id = reltype.id WHERE (rel.id >= NNNN AND rel.id <= NNNN)` where 'NNNN' are the numbers found in the error log message above (in my case 3 and 5002)
2. Export that data to, eg. a CSV file and reformat from CSV data as SQL insert statements using `INSERT IGNORE` instead of `INSERT` to avoid any foreign key errors: `INSERT IGNORE INTO civicrm_relationship_cache (relationship_id, relationship_type_id, orientation, near_contact_id, near_relation, far_contact_id, far_relation, start_date, end_date, is_active) VALUES (39,2,"a_b",2222,"Spouse of",712,"Spouse of",NULL,NULL,1);` (Change the sample data here to match each row of the results obtained in step one). I deliberately created each row as a separate insert in case of unexpected errors, so the entire insert process didn't fail. Save as an sql file for later.
3. Then run the inverse of the query: `SELECT rel.id, rel.relationship_type_id, "b_a", rel.contact_id_b, reltype.name_b_a, rel.contact_id_a, reltype.name_a_b, rel.start_date, rel.end_date, rel.is_active FROM civicrm_relationship rel INNER JOIN civicrm_relationship_type reltype ON rel.relationship_type_id = reltype.id WHERE (rel.id >= NNNNN AND rel.id <= NNNNN)`
4. Repeat step 2 above with the results of step 3.
5. Edit the upgrade file path/to/civicrm/civicrm/CRM/Upgrade/Incremental/php/FiveNineteen.php and comment out everything inside the populateRelationshipCache method except 'return TRUE'.
6. Run the civicrm database upgrade script. It should now complete successfully.
7. Run/import the SQL statements you generated in step 2 and 4 on the CiviCRM database to complete the migration process from civicrm\_relationship to civicrm\_relationship\_cache.

If there's a vastly simpler way of achieving this workaround that I've missed, happy to hear it!

To reiterate, my primary question is: "is this a bug I should report?"

---

It's obviously fair to make the point that the problem is ultimately mine created by some data inconsistency that caused the foreign key error.

All I can say is this is a database that's been around almost a decade, been converted from Joomla to Wordpress along the way and 'foreign key errors happen', especially in databases of some age which may have had some less than perfect extensions installed and removed from time to time. It would be helpful if upgrade errors failed more gracefully, or even provided the option to continue ignoring the foreign key problem. Admittedly we're also dealing with MySQL's own completely unhelpful way of handling foreign key problems which make it cumbersome to identify the rows that are causing problems so as to resolve them rather than ignore them.

# Answer
Your system have orphan data in civicrm\_relationship table. There are few rows in civicrm\_relationship table that have contact id in column civicrm\_relationship.contact\_id\_a or civicrm\_relationship\_contact\_id\_b are missing in civicrm\_contact.

```
SELECT cr.*
FROM civicrm_relationship cr
LEFT JOIN civicrm_contact cc
  ON cc.id = cr.contact_id_a
WHERE cc.id IS NULL

SELECT cr.*
FROM civicrm_relationship cr
LEFT JOIN civicrm_contact cc
  ON cc.id = cr.contact_id_b
WHERE cc.id IS NULL;

```

Above query should give you list of orphan records.

Fix:

1. Delete all orphan data from civicrm\_relationship table before running upgrade
2. Check if FK is defined for civicrm\_relationship table

HTH

Pradeep
> 4 votes

# Answer
Further to Pradeep Nayak's reply, the ultimate cause of the problems I was having were missing foreign key constraints on the civicrm\_relationship table leaving orphaned data when contacts were deleted.

Therefore, a solution which fixes the problem rather than working around it would be:

1. Check that all foreign key constraints are missing on civicrm\_relationship table.
2. Run `DELETE FROM civicrm_relationship WHERE contact_id_a NOT IN (SELECT DISTINCT id FROM civicrm_contact)`.
3. Run `DELETE FROM civicrm_relationship WHERE contact_id_b NOT IN (SELECT DISTINCT id FROM civicrm_contact)`.
4. Add the missing foreign key constraints:

`ALTER TABLE civicrm_relationship ADD CONSTRAINT FK_civicrm_relationship_contact_id_a FOREIGN KEY (contact_id_a) REFERENCES civicrm_contact(id) ON DELETE CASCADE;`

`ALTER TABLE civicrm_relationship ADD CONSTRAINT FK_civicrm_relationship_contact_id_b FOREIGN KEY (contact_id_b) REFERENCES civicrm_contact(id) ON DELETE CASCADE;`

`ALTER TABLE civicrm_relationship ADD CONSTRAINT FK_civicrm_relationship_relationship_type_id FOREIGN KEY (relationship_type_id) REFERENCES civicrm_relationship_type(id) ON DELETE CASCADE;`

`ALTER TABLE civicrm_relationship ADD CONSTRAINT FK_civicrm_relationship_case_id FOREIGN KEY (case_id) REFERENCES civicrm_case(id) ON DELETE CASCADE;`
5. Run the CiviCRM upgrade script.

I still think an upgrade silently failing is a bug that probably deserves to be fixed.
> 5 votes

---
Tags: upgrade, relationships, mysql
---


# Question
Title: Permission 'See CiviCRM is installed' keeps being removed on Joomla
I have a problem where the CiviCRM permissions on a Joomla site keep being altered. The 'See CiviCRM is installed' permission is set on 'Registered' users to 'Allowed' but keeps being reset to 'Not Allowed'. Any suggestions as to what might be causing this would be appreciated - could it be a CiviCRm security check process running something?

PHP version 7.3.24, Joomla! 3.9.19 Stable, CiviCRM 5.31.0

# Answer
There is a paid Joomla component PWT ACL that helps a lot with these kind of problems. For instance: the 'See CiviCRM is installed' permission could be the right to view the component with all contacts etc. This view of the component is only possible from the admin area of the website. To view it you need the right to login, you need to login at website.ext/administrator, and only then you can see the component as such. If your registered user does not have the right of access to the admin area this right to See CiviCRM is not permitted, even if you explicitly set it like that: because the system does not allow access to the admin area, it cannot give access to the CiviCRM component when this requires access to the admin area first.

PWT ACL helps solve conundrums that can exist with 'clashing rights settings'.
> 0 votes

---
Tags: joomla, security
---


# Question
Title: How to get all active states & provinces from one api call?
I would like to get all active (i.e., in countryLimit) states & provinces available in my site for use in HTML tag. Can I query for that with a single JavaScript call to CRM.api3?

I've tried:

```
CRM.api3('Setting', 'get', {

```

"sequential": 1, "return": \["countryLimit"\], "api.StateProvince.get": {}

but that just gives me two unrelated arrays. Can I join them somehow?

# Answer
> 1 votes
```
CRM.api3('StateProvince', 'get', {
  "sequential": 1,
  "return": ["name","country_id.name"],
  "options": {"limit":0}
})

```

UPDATE: I haven't tried this but `Lodash` v3 is loaded on most civi pages so you might be able to use filter or forEach to combine the results of the above with the countryLimit array to remove inactive ones.

# Answer
> 0 votes
Adding another answer since this might work for you better. In your extension in hook\_civicrm\_buildForm do something like this. I'm not sure if this is documented anywhere but the country/state chain will do some autowiring for you if your fields are named in a special way.

```
function myextension_civicrm_buildForm($formName, &$form) {
  if ($formName == 'The_Form_Name') {
    $form->add('select', 'country', ts('Country'), CRM_Core_PseudoConstant::country());
    $form->addChainSelect('state_province');
    CRM_Core_Region::instance('form-body')->add(array(
     'template' => 'CRM/Myextension/my.tpl',
    ));
  }

```

Then in CRM/Myextension/my.tpl something like:

```
<tr><td class="label">{$form.country.label}</td>
<td>{$form.country.html}</td></tr>
<tr><td class="label">{$form.state_province.label}</td>
<td>{$form.state_province.html}</td></tr>

```

You may have to fiddle a bit but this will automatically apply the countryLimit and connect the two fields.

---
Tags: api, javascript
---


# Question
Title: How do you report group history? (audience growth/change)
We transitioned from MailChimp to Mosaico - overall is been okay - but there is a report we were asked to generate that I can't seem to figure out. The report would display group size over time (monthly preferred). This way we can visually demonstrate growth or decline over any time period. Is there a way we can do this?

Somewhat related: How many new subscriptions (added to group) since last mailing to group. (I can do the math - but it would be nice if it was a report so I can have it on their dashboards.)

# Answer
> 5 votes
You can try this Group Growth extension

# Answer
> 2 votes
You can try below two extension and modify as per your needs

https://lab.civicrm.org/extensions/mailingsubscriptions

https://lab.civicrm.org/extensions/subscriptionhistory

# Answer
> 0 votes
Depending on your exact needs, the Historic Membership Data extension may also be helpful.

---
Tags: civimail, groups, reports, unsubscribe, subscribe
---


# Question
Title: Wordpress with Divi: How to integrate CiviCRM contribution pages?
I am trying to set up a contribution page within a Divi layout. At a short glimpse, that looks well, but: this won't work! Instead, I get a lots of CSS problems and JS errors.

I could imagine to get a quick solution using some customizing within the Divi templates.

Or, I return to the original CiviCRM contribution pages, and do the CSS stuff (that is provided by Divi) somewhat manually, in order to create a contribution page looking similar to the Worpdpress Website.

Anybody out there with experience on that?

# Answer
Detlev asked me to answer this question, but to be honest we also insert the CiviCRM contribution page with shortcode in the classic editor. Trying to include the shortcode within a divi module (Divi Text or Code Module) looks nice but doesn't work here as well.

So in detail I create the global site layout with the Divi Theme Builder and set all usefull global settings at the Divi Theme Customizer. Than I activate the classic editor in Divi Theme Options to get the CiviCRM button at the page editor. For style changes regarding the contribution form I use custom CSS as usual.

When I need more Divi Content above or below the contribution content I use the wordpress plugin Simple Divi Shortcode in addition. Therewith I can similarly integrate Divi modules (which I previously build at the Divi library) as shortcode in the classic page editor.
> 2 votes

# Answer
We've worked around this simply by using the default editor instead of the Divi Builder to edit pages with CiviCRM short-codes. Obviously not a real fix for the Divi issue, but we chose to fight other battles instead.
> 1 votes

---
Tags: wordpress, contribution-page
---


title: Why are my users being blocked?

text:
# Question
Title: Why are my users being blocked?
A few members have reached out to me to say that their account has been blocked. I have gone into their accounts to "enable" their user status and change their password. However, the member is still getting the "block" notice and when I re-enter their account, their user status is flipped back to "blocked".

How to I enable these users that are continuing to be blocked?

# Answer
A 'user' account is usually managed by the CMS. Their are integration tools that will set a user 'role' according to eg Member status or Groups, but that isn't what you are describing.

If you are using Drupal it could be that you had Drupal Rules that are designed to set a user record as Blocked based on some characteristic.

It may be possible to do similarly via CiviRules or an equivalent in WP.
> 1 votes

# Answer
When you link up Joomla registration with a CiviCRM profile, you need to note if you've chosen the account to be immediately approved or to require admin or user approval. This information isn't communicated to CiviCRM, so even if you have approval turned on, the process will create a Civi contact using whatever profile you've chosen, and you won't be able to see the blocked status from within Civi.

In the case of people having their logins blocked, there are usually a few reasons:

1. You have user registration (In Joomla) set to have one level of approval, so all new accounts are blocked off the bat and only approved once either the user or admin clicks the link in the Joomla-generated email, depending on your settings.
2. The person has attempted a password reset through the built-in Joomla function and not completed it for some reason. When someone requests a password reset, Joomla blocks their user account until the process has been completed.

I hope that helps!
> 1 votes

# Answer
"A few members have reached out to me to say that their account has been blocked. I have gone into their accounts to "enable" their user status and change their password."

Happy to help a fellow Joomlian Civi user!

CiviCrm generates "contacts". To give a contact rights to edit their own personal contact data you have to give them a Joomla "user account".

A user account is always member of at least one Joomla "user group". Users get assigned the rights that belong to the usergroup they are part of.

For instance: the right to see their own personal data and to change these. Members of a Joomla usergroup that functions as a CiviCrm admin group will have (lots of) rights beyond these two rights.

To set all possible CiviCrm rights for all Joomla user groups you have to login to the site management area (website.com/administrator) as a member in the Joomla superuser group. After you login, you click on System/Global Configuration (left top-menu in admin area). You will see 5 tabs with settings on top and left of these a column titled Component. In this list you click on CiviCRM.

You see two tabs: Readme and Permissions. In the Permissions tab you can set all rights for all user groups to dozens of CiviCRMs view and action rights.

This permits lots of fine detailed settings for lots of groups. The Joomla rights system is very flexible but takes some work to get familiar with.

I suspect that your problems could be the result of errors in these settings.

Hope this helps you along!
> 0 votes

---
Tags: joomla, user-account
---


# Question
Title: Install or upgrade CiviCRM using Composer 2?
Has anyone documented using Composer 2 with an install and/or upgrade of Drupal 8 + CiviCRM?

I'm getting this error:

```
    - civicrm/composer-downloads-plugin[v2.0.0, ..., v2.1.1] require composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - civicrm/civicrm-core 5.30.1 requires civicrm/composer-downloads-plugin ^2.0 -> satisfiable by civicrm/composer-downloads-plugin[v2.0.0, v2.1.0, v2.1.1].
    - Root composer.json requires civicrm/civicrm-core 5.30.1 -> satisfiable by civicrm/civicrm-core[5.30.1].

```

# Answer
It should be possible to do any one of these:

* **Use CiviCRM 5.31+**. The error message above suggests it is using 5.30.x, which has older metadata. (Compare: 5.31's composer.json vs 5.30's composer.json)
* **Stick to composer v1** for as long as you're using an older version of Civi.

```
composer self-update --1

```

In the future, after you switch to a newer version of Civi (eg 5.31+), you can continue to composer v2:

```
composer self-update --2

```
* **Coerce the versions**. Tell composer to install a new version of `composer-downloads-plugin` (v3.0.0 -- which supports composer v2) and pretend like it's an old version (v2.1.99 -- which is expected in `civicrm-core` v5.30). Command:

```
composer require 'civicrm/composer-downloads-plugin:v3.0.0 as v2.1.99'

```

In the future, after you switch to a newer version of Civi (eg 5.31+), you should edit `composer.json` and remove the coerced constraint. Otherwise, you may see weird behavior.
> 5 votes

# Answer
Although as of today (2020-11-20) there's no official word, I can see work being done towards this, e.g.

https://github.com/civicrm/composer-downloads-plugin/releases/tag/v3.0.0
> 2 votes

---
Tags: drupal-8, composer
---


# Question
Title: Why isn't there a CiviRules action to change membership status?
As per the title: why isn't there an action in CiviRules to be able to change membership status i.e. from active to cancelled? This seems like something a lot of people would use. Is anyone working on something?

# Answer
it is not there because apparently no one needed it :-) The actions in CiviRules get added whenever a CiviCRM user funds the development of one or develops one and shares it as a general action. So this has not happened up to now. If you really need it you are very welcome to develop and share it, or fund the development by a partner who will most certainly share it.

I totally understand if you can not develop nor have the funds available. That then means you have to wait until someone else invests energy or funds. The answer to the why question is then again no one so far has :-)
> 2 votes

# Answer
Further to Erik's response, I would go one step sideways! Most of the clients we have will use the Membership Status Rules to trigger changes of state in the membership status i.e. after the end date passes move the membership into Grace and then after a period of time move to expired. I think the real question is what are you trying to do that requires CiviRules and is not catered for by the standard Membership Status Rules? Finally if you did use something other than the Membership Status Rules you would in effect be setting the override flag on all memberships therefore potentially causing confusion on what the source for a status change was - was it triggered by CiviRules or Membership Status Rules? Just my two pennies worth!
> 2 votes

---
Tags: civirules
---


title: How to search the change log?

text:
# Question
Title: How to search the change log?
The docs on synchronizing users to contacts say:

> You can then search your contact records to view or edit the new contact records. Go to Advanced Search , \>\>Change Log section and enter dates that include the date when the synchronization was performed.

But on my Advanced Search page, there is no Change Log section. Has this changed? How do you search the change log?

# Answer
> 1 votes
It's under Administer - Customize Data and Screens - Display Preferences where it says "Contact Search". It has probably been unchecked.

---
Tags: contacts, user
---


# Question
Title: Error message when testing memberships: "Expected one PaymentProcessor but found 0"
we are now trying to test the membership signups which includes recurring payments. I've gone through all the steps on the contribution pages and have not seen any errors there (except that no thank you email was sent, but this may be a separate issue from this one)

However once I go to "Memberships" -\> "Find Memberships", **choosing "Yes" for "Membership is a test"**, and clicking on "Search" I get this error:

> Sorry but we are not able to provide this at the moment. Expected one PaymentProcessor but found 0

Output from `/sites/default/files/civicrm/ConfigAndLog`:

```
Mar 02 18:51:27  [info] $backTrace = #0 /home/peoplesfund/www/www/sites/all/modules/civicrm/CRM/Core/Error.php(451): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/peoplesfund/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(55): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))
#2 /home/peoplesfund/www/www/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
#3 [internal function](): civicrm_invoke("member", "search")
#4 /home/peoplesfund/www/www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#5 /home/peoplesfund/www/www/index.php(21): menu_execute_active_handler()
#6 {main}

```

(Entire output is not shown because a huge code mass is printed. I can provide this if needed though in a file)

I've also tried enabling debugging but the same error screen is shown

*There is no problem when searching if we have chosen "No" for "Membership is a test"*, this will (instead of the error message) produce a list of real members that we have

Does anyone know what we can do to solve this problem? Is it likely that this will cause problems for the live contribution pages in the future (even if that is not the case right now?)

Grateful for help and with kind regards, Tord

# Answer
I had the same error. It appeared that we had removed a payment processor that we had used before, but don’t use any more (never do that. Just disable the payment processor).

When searching for memberships, also attached payments are displayed. Some of these payments het the removed payment processor. The was causing the error.

We restored the payment processor. In the database we changed the ID’s of the live and the test payment processor to the original ID’s. That solved the issue.
> 2 votes

# Answer
I think I had this problem when there was an erroneous test payment processor set up. I fixed it by removing this payment processor from the civicrm\_payment\_processor table. Every entry should be duplicated - one with is\_test = 1, and one with is\_test = 0. You could try removing any entries where only one of these exists.
> 1 votes

# Answer
I always look for ways to TEST in LIVE mode - because the is\_test pathway in CiviCRM is not what you want to test - you want your tests to be as close to your is\_live as possible.

Create a new payment processor "iATS - TEST88" or "Authorize - TEST" and put the test credentials into the "live" section. Then run real live tests.

Only downside is you'll have some clean up to do as people have purchased real Memberships and have credit real Contributions and real Recurring Series with fake credit cards - but the huge upside is that if you get things working - you'll know for sure it will work when you plug in your own Store credentials and processing URL into your Payment Processor's config.

Here's an example for test credentials under Live section for Authorize.net:
> 1 votes

---
Tags: civicontribute, civimember, payment-processor, recurring-contributions
---


# Question
Title: Drupal-8 / Civi 5.32 -- In D8 I see some civi blocks for me to use. Where are they defined?
I've been spending a lot of time in the Civi galaxy learning the ropes. Now I am moving back to the drupal galaxy. I know they reside in the same universe and there are some blocks pre-built to expose Civi to Drupal.

Users are one area with overlap.

But Views... I see some pre-built civi views for me to place in Drupal. Where are they defined??

There is a pre-built view for upcoming events and I would like to tweak that to only show upcoming events where event type ==x.

Any help would be appreciated! Thanks

# Answer
> 2 votes
It's not a "view" in the drupal meaning of the word. It's coming from here: https://github.com/civicrm/civicrm-core/blob/6960dd4c1e5e99f8e0b3564dcc15269184d7702d/CRM/Core/Block.php#L523

I think the "right" way to customize this would be with your own drupal module that creates a block that does the same thing but calls that `CRM_Event_BAO_Event::getCompleteInfo(date("Ymd"));` function with the 2nd parameter which allows you to specify type.

I don't know if there's a hook that would allow you to more easily customize it in a supported way. If you want to hack it, just add a second parameter on that line to specify the type.

UPDATE: You could also do this as a drupal "view" if you install civicrm\_entity. Views can be displayed as blocks.

---
Tags: civievent, drupal
---


title: Survey Questions vs Contact Info

text:
# Question
Title: Survey Questions vs Contact Info
CiviSurvey has two types of information we could collect - 'Contact Info' and 'Questions'. Is there any difference between these two from an implementation perspective? Would it make any difference if I add a profile in Contact Info vs Questions?

# Answer
> 5 votes
There are limitations in CiviCRM profiles mixing Contact and Activity fields (survey responses are stored as activities). If your profiles work as you expect during testing, there won't be any hidden side effects, but having two profiles on a survey is meant to allow you to ask for both contact-specific and survey-specific information on a single survey.

---
Tags: custom-fields, profile, civisurvey
---


title: Adding Notes to Profile Summary

text:
# Question
Title: Adding Notes to Profile Summary
I'm new to CiviCRM and am trying to make it very streamlined for my team. They mentioned that having the Notes (adding ability and listng previous notes) on the Contact Profile's Summary tab would be best for quick access. I'm wondering if this is possible?

# Answer
You could look at this extension which lets you modify the layout of the Contact screen, and in doing so lets you pull in Dashlets from Reports

The problem i can see though it that there is no obvious report builder for Notes.

Depending on your CMS you could potentially do this via a CMS tool such as Views in Drupal, and then add the Block as a Dashlet on that Summary Layout tool.

I have not tested the above but it is one concept to rule in/out. Otherwise a small extension that modifies the templates involved may give you what you need but would require someone with developer skills. Good luck.
> 0 votes

---
Tags: profile
---


title: Alter custom field view

text:
# Question
Title: Alter custom field view
I have created a set of custom fields and I want to hide some data which have specific value, I have tried using

```
$smarty = CRM_Core_Smarty::singleton();
$smarty->assign('records', []);

```

to try and hide all the data but they are still showing.. can anyone help me? thanks a lot

# Answer
Accomplished it by filtering field data in CRM\_Custom\_Page\_AJAX in the function getMultiRecordFieldList(), code goes like:

```
$data_arr = array('1','2','3');
$obj = new CRM_Profile_Page_MultipleRecordFieldsListing();
list($fields, $attributes) = $obj->browse();
foreach ($fields as $key => $value) {
  if($fields[$key][[custom_field_id]]['data'] && !in_array($fields[$key][[custom_field_id]]['data'], $data_array)){
    unset($fields[$key]);
  }
}

```
> 1 votes

# Answer
This is hard to answer because the question is a bit too general and it depends what "hide" means. You could try something like `$form->removeElement('element_name');` in hook\_civicrm\_buildForm. Just for custom fields sometimes it's tricky to get the name right.
> 0 votes

---
Tags: custom-fields
---


# Question
Title: How to identify if a contact id is associated with an administrator role?
I need to write a code to identify if a contact id is associated with an administrator role in my civiCRM extension and it needs to be platform independent. How can I achieve it ?

# Answer
> 2 votes
I don't think you can do this in a platform-independent way since "admin role" means different things in different CMS's. What you can do that is platform-independent is check specific CiviCRM permissions, e.g. `CRM_Core_Permission::check('administer CiviCRM', $contact_id)`

You can leave out $contact\_id to check for the currently logged-in user.

---
Tags: contacts, roles
---


title: contact import process

text:
# Question
Title: contact import process
1. I am importing 955 contacts and assigning them a tag or a group (or both). Time estimate showing is 20 minutes.
2. During the import the connection times out.
3. After waiting a long while, I go back to CiviCRM and look at the group or tag and see that they now have 955 contacts listed whereas before the import both were 0.

A) How can I quickly see if the import was successfully finished?

B) Is adding the contacts to a group or tag one of the last steps for the import process?

C) If the contacts are now listed in the previously empty group or tag, does that indicate that the import was successful?

# Answer
Look at MySQL and find the temporary table. It will be names something like "*civicrm\_tmp\_d\_dflt\_...*"

Search status=NEW and that will tell you the number of rows left to import. Once the table has no NEW rows to import it is done and the table will be removed. If it did not succeed the table will still exist. I find this the best way to monitor the progress of imports using the default importer.
> 1 votes

# Answer
Workarounds include

* add a custom field purely to track the import by adding a 1,2,3 etc column in your import
* sometimes screens can time out but the import runs regardless, so having the above helps confirm if it really has stopped or not
* hunt down some tickets about tweaking server so it runs for longer
> 1 votes

---
Tags: contacts, import, batches
---


title: Older versions?

text:
# Question
Title: Older versions?
I'm currently running 5.27 and need to upgrade. I tried upgrading to the latest version and it got stuck. This usually means I need to do smaller upgrade jumps instead of going straight to the latest version. However, the link that used to be on the download page to older versions is gone. And the release announcements all point to the download page.

What would be the link(s) I need to go to 5.28, 5.29, and 5.30? Thanks!

# Answer
You can manipulate the download link

https://download.civicrm.org/civicrm-5.30.0-drupal.tar.gz

https://download.civicrm.org/civicrm-5.28.4-drupal.tar.gz

https://download.civicrm.org/civicrm-5.29.0-drupal.tar.gz

or you can use sourceforge page to get all versions.
> 6 votes

# Answer
I was in a similar position and spotted the urls follow a similar pattern and just changed the version numbers...

https://download.civicrm.org/civicrm-5.31.1-wordpress.zip

https://download.civicrm.org/civicrm-5.30.0-wordpress.zip

https://download.civicrm.org/civicrm-5.29.0-wordpress.zip

https://download.civicrm.org/civicrm-5.28.0-wordpress.zip
> 3 votes

---
Tags: upgrade
---


# Question
Title: Why does CRM.url give different results in WordPress and Drupal?
I'm trying to understand why the JavaScript function `CRM.url` gives different results depending on CMS. Can anyone explain?

For example this code:

```
CRM.url('civicrm/payment/ipn/test', null, 'front')

```

In WordPress it returns the complete URL with the domain:

`http://wpmaster.localhost:7979/civicrm/civicrm/payment/ipn/test/`

Whereas in Drupal in returns the URL without the domain:

`/civicrm/payment/ipn/test`

This inconsistency feels wrong. Is it a bug in CiviCRM?

For context I'm looking at this issue: https://github.com/artfulrobot/uk.artfulrobot.civicrm.gocardless/issues/97

# Answer
I believe the third parameter should be boolean not string, 1 or 0/ true or false
> 0 votes

---
Tags: javascript
---


# Question
Title: Memberships - Renewals and grace periods
I seem to remember doing this in the past, but can't recall how I did it.

We need a membership where:

* it's one price to join
* one price to renew during the grace
* one price to renew after the grace

# Answer
> 3 votes
You could use the CiviDiscount module and tie various discounts to membership status rules. You would need to create a discount code for each membership type and status and then in the "Automatic discounts" section at the bottom of the settings for the discount code, choose the appropriate membership status for that code.

---
Tags: civimember
---


title: How to create a group from CSV file?

text:
# Question
Title: How to create a group from CSV file?
I have a CSV file with email addresses. Part of these addresses are in CiviCRM.

How can I create a CiviCRM group that includes contacts with emails matching those in CSV file?

# Answer
> 1 votes
(EDIT - read Lars' suggestion first)

Seems clumsy but this might work.

Run the import with SKIP and at the final step of the import there is an option to either add the contacts to a New Group (A) for the same.

This should give you a group of those who did not exist in db before import

Then re-run the import without SKIP and create new group (B) so that should give you all the list.

then use Custom Search called Include/Exclude and

---
Tags: import, data-import
---


# Question
Title: Automatically filling custom fields with data
Is there a way to automatically populate a custom field with data from other parts of Civi?

My use case is simple. We have an arts organization that uses relationships to link "partners" together. The problem is that this information is not always easy to see and requires many clicks to identify the details.

I would like to create an individual contact custom field that shows the "partners" name for each of the individuals that are linked by a household.

**Example**:

* Leslie and Shawn each have individual contact records so when I access Leslie's record I would like to see that there is a relationship with Shawn.
* It would also be great to see a household donation total in both records.

Any input would be greatly appreciated.

# Answer
Why not expose the Relationship information on the Contact Summary screen? Two ways to do this that I know of

a/ use this extension to show a block of a specified relationship type

b/ use the Contact Summary Layout editor extension but that requires resetting up the whole contact screen
> 3 votes

---
Tags: custom-fields, individual
---


# Question
Title: Has select always included the label on drop down lists?
Maybe I am just noticing things now but has select always included the label on drop down lists? I thought it used to say -none- when none was selected.

Example from dmaster demo

# Answer
> 0 votes
Yes that was one of the many changes in 5.31 related to screen readers and buttons and such. https://github.com/civicrm/civicrm-core/pull/17675

It also inadvertently made all my contacts appear to be from Afghanistan.

---
Tags: profile
---


title: Mass deletion of contacts

text:
# Question
Title: Mass deletion of contacts
I woudl like to mass delete contacts in my civicrm. I could search and delete using the GUI but it woudl take ages as there are so many.

I feel like I might be able to do this via the api?

Also another response suggested using views Bulk Delete of Spam Contacts and related Drupal Users

Does anyone have any tips?

I will have another question depending on the tips probably!

# Answer
> 0 votes
Potentially you could do this in a little script using the API?

# Answer
> 0 votes
In APIv3 you delete one contact at at time using `id = ...`. In APIv4 you can delete based on more flexible conditions.

You can get to both versions from `Support > Developer > API Explorer 3` or `4`. If that is not showing up, what version are you on?

You can run it as a script via ssh. Both API Explorers show you the equivalent php code. Copy that into a file then you can run it with `cv scr /your/script/file`.

Alternatively, Explorer also shows you a `cv` version section (APIv3) or `CLI` (APIv4). Quoting can get awkward for anything complex directly on the command line.

---
Tags: api, delete
---


# Question
Title: Issue creating Premium - requiring subscription
When trying to add a new Premium (first one), I get the error "Please enter a Period Type" - even though the premium is a regular "product" and not a subscription. Civi 5.31 / Drupal 7.73 / PHP 7.3

# Answer
> 1 votes
Problem identified and fixed by @eileen with commit planned for 5.32 - https://lab.civicrm.org/dev/drupal/-/issues/148

---
Tags: civicontribute, premiums
---


# Question
Title: Can you create a mailing list based on tags
Is there a way to use tags, possibly multiple tags e.g. using the tags `Students` and `Attended Conference X`, to create a bulk mail to members who fit into just those two categories.

# Answer
Search Builder should let you say 'find Contacts who have this tag AND have that tag' and then set up the Smart Group from that.
> 1 votes

# Answer
You can do this with Search - Advanced Search but note the AND/OR operator maybe doesn't work quite as you'd expect. It only works between different fields and within a single multiselect field it is always `OR`.

But you can do a workaround:

1. Go to Search - Find Contacts.
2. Pick your first tag.
3. From the actions dropdown in the result list, create a group, e.g. Student Group.
4. Go to Search - Custom Searches - Include / Exclude Search
5. For Include Groups choose your group.
6. Select "AND".
7. For Include Tags select your second tag.
8. From the actions dropdown in the result list either create a group for future use or you can choose to schedule/send an email.

Alternatively for steps 4-8 you can use Advanced Search instead of the custom search and put your group in the Groups field and your tag in the Tags field.
> 0 votes

---
Tags: groups, smartgroups, mailing, tags
---


# Question
Title: Does CiviCRM integrate with 3rd party email account
I cannot specifically find this information, so therefore the question.

We would like to know if civicrm integrates with say external email accounts so that emails received from constituents into our normal email accounts are automatically recognised and mapped to the constituent record so that emails sent and received can be viewed within the civicrm as part of the constituent activity.

Wayne

# Answer
Civi has integrations for GMail and Outlook 365, but also has a feature Pete mentions in the comments called "Inbound Mail". This works with all mail systems, and is also more seamless than the integrations.

The official integrations are for having LESS automation - e.g. if two people have the same email address, it will pop up a box to let you choose, while the automated method picks the first matching contact it finds. Or let you use CiviCRM as an address book. You may still want them.

For what you want, I would set it up like this:

* Create a new mailbox at your organization, e.g. "civicrm@example.org".
* Set a filter in your mail program to automatically forward (or better, redirect) a copy of each email to this new mailbox. Note you can tweak your filter to exclude certain types of mail (e.g. listservs).
* Configure CiviCRM to check this mailbox (**Administer menu \>\> CiviMail \>\> Mail Accounts**, then **Add Mail Account**). Exact directions are in the documentation linked by Pete. Also be sure to read about permissions for users to edit inbound emails - this is new in Civi 5.31+.
* Make sure the *Process Inbound Mail* job is turned on in Scheduled Jobs (**Administer menu \>\> System Settings \>\> Scheduled Jobs**).
* If you need further customization, it can be done through extensions. E.g. this extension was written for an organization that wanted two inbound email addresses, and emails sent to the second address were restricted to privileged users.
> 3 votes

---
Tags: email, integration
---


title: What has happened to totten/lurkerlite?

text:
# Question
Title: What has happened to totten/lurkerlite?
Problem 1
Installing CiviCRM using Composer has started giving these errors:

```
    - Root composer.json requires civicrm/composer-compile-plugin ^0.14.0 -> satisfiable by civicrm/composer-compile-plugin[v0.14].
    - civicrm/composer-compile-plugin v0.14 requires totten/lurkerlite ^1.3 -> could not be found in any version, there may be a typo in the package name.

```

Problem 2

```
    - civicrm/composer-compile-plugin v0.14 requires totten/lurkerlite ^1.3 -> could not be found in any version, there may be a typo in the package name.
    - civicrm/civicrm-core 5.31.1 requires civicrm/composer-compile-lib ~0.3 || ~1.0 -> satisfiable by civicrm/composer-compile-lib[v0.3, v0.4].
    - civicrm/composer-compile-lib[v0.3, ..., v0.4] require civicrm/composer-compile-plugin ~0.9 || ~1.0 -> satisfiable by civicrm/composer-compile-plugin[v0.14].

```

Does anyone know what has gone wrong?

# Answer
```
- civicrm/composer-compile-plugin v0.14 requires totten/lurkerlite ^1.3
   -> could not be found in any version, there may be a typo in the package name.

```

The error message suggests a typo, which I think is misleading/incorrect. Let me give some counter-indicators -- and then some alternative theories.

The name and version should be correct because:

* (A1) In the official directory of composer packages (`packagist.org`), it lists `totten/lurkerlite` with version 1.3.0 as available. See: https://packagist.org/packages/totten/lurkerlite
* (A2) If I create a new project with a minimalist `composer.json`, then it does manage to install `totten/lurkerlite`.

```
mkdir /tmp/abcd
cd /tmp/abcd
echo '{}' > composer.json
composer config minimum-stability dev
composer require civicrm/civicrm-{core,packages}:5.31.1
ls vendor/totten/lurkerlite/

```

You may want to try a new/empty project like this yourself. If the new/empty project works, then that points to an issue in the local `composer.{json,lock}` (like B1/B2/B4). If the new/empty project also fails, then that points to an issue in the upstream or tooling (like B3/B4).

Some alternative theories:

* (B1) `composer.lock` may become overly opinionated. Try clearing it even more aggressively:

```
mkdir /tmp/old-stuff
mv composer.lock vendor /tmp/old-stuff
composer install

```
* (B2) `composer.json` may become overly opinionated or have old/redundant constraints. Double-check the current list of recommended packages and then read your local `composer.json`. See if there are any extra/redundant constraints.
* (B3) `composer` has a local cache (e.g. `~/.cache/composer/`). This cache could be corrupted/stale (e.g. if there was a network-error or disk-error at the wrong moment). Try clearing it out.
* (B4) `composer` can be configured with alternative repositories/feeds. If the configuration disables or supercedes `packagist.org`, then it might not get a consistent feed. (*Most people don't disable packagist -- if you do this, then you should know about it.*)
> 1 votes

---
Tags: installation, composer
---


# Question
Title: DB Upgrade/Update Error - no such field, unknown column
We're using CiviCRM 5.31.0 on Joomla 3.9.23.

Even with all CiviCRM extensions disabled, we get similar errors like this when doing a DB Upgrade, installing, enabling, and disabling extensions.

How do we resolve this?

```
#0 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
#1 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/DB.php(997): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...")
#3 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...")
#4 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/PEAR.php(223): PEAR::_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...", "DB_Error", TRUE)
#5 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
#6 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(936): DB_common->raiseError(-19, NULL, NULL, "\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...", "1054 ** Unknown column 'workflow_name' in 'field list'")
#7 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
#8 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...")
#9 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2696): DB_common->query("\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...")
#10 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...")
#11 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(457): DB_DataObject->query("\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...")
#12 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(1563): CRM_Core_DAO->query("\n            UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBL...", TRUE)
#13 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Incremental/MessageTemplates.php(314): CRM_Core_DAO::executeQuery("\n            UPDATE civicrm_msg_template SET msg_html = %1 WHERE id IN (38,37)", (Array:1))
#14 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Incremental/General.php(157): CRM_Upgrade_Incremental_MessageTemplates->updateTemplates()
#15 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php(808): CRM_Upgrade_Incremental_General::updateMessageTemplate("<p>This system uses MySQL/MariaDB v5.6.41-84.1-log. You may proceed with the ...", "5.30.alpha1")
#16 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php(108): CRM_Upgrade_Form->setPreUpgradeMessage("<p>This system uses MySQL/MariaDB v5.6.41-84.1-log. You may proceed with the ...", "5.29.1", "5.31.0")
#17 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php(57): CRM_Upgrade_Page_Upgrade->runIntro()
#18 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#19 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
#20 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
#21 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:2))
#22 /home/fxx/public_html/fxx/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#23 /home/fxx/public_html/fxx/libraries/src/Component/ComponentHelper.php(402): require_once("/home/fxx/public_html/fxx/administrator/components/com_c...")
#24 /home/fxx/public_html/fxx/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/home/fxx/public_html/fxx/administrator/components/com_c...")
#25 /home/fxx/public_html/fxx/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
#26 /home/fxx/public_html/fxx/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#27 /home/fxx/public_html/fxx/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication->doExecute()
#28 /home/fxx/public_html/fxx/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#29 {main}

```

# Answer
Welcome to SE! The missing column is `workflow_name`. That should have been added by the upgrade to 5.26. Check the table definition for `civicrm_msg_template` \- does it have a `workflow_name` column? If not, go back and look at your logs for the upgrade to 5.26 and see if there are any errors there.

Also, do you have logging enabled? If so disable and re-enable that at `Administer > System Settings > Misc > Logging` to make sure the logging table schema is correct.
> 1 votes

---
Tags: upgrade, error
---


# Question
Title: No such file or directory when install civiCRM
i try to install civiCRM on my Drupal 9 local website. I use Mamp 5.5 on Mac.

I follow all install information and now I'm hold on this situation:

% cv core:install --db="mysql://civicrm\_user:myuser@localhost:3306/mydb" --lang=it\_IT -vv

```
Box Requirements Checker
========================

> Using PHP 7.4.10
> PHP is using the following php.ini file:
  /usr/local/etc/php/7.4/php.ini

> Checking Box requirements:
  .....

 [OK] Your system is ready to run the application.

  [PDOException]
  SQLSTATE[HY000] [2002] No such file or directory

Exception trace:
 () at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php:150
 PDO->__construct() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php:150
 Drupal\Core\Database\Driver\mysql\Connection::open() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Core/Database/Database.php:380
 Drupal\Core\Database\Database::openConnection() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Core/Database/Database.php:169
 Drupal\Core\Database\Database::getConnection() at n/a:n/a
 call_user_func_array() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php:79
 Drupal\Component\DependencyInjection\PhpArrayContainer->createService() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Component/DependencyInjection/Container.php:171
 Drupal\Component\DependencyInjection\Container->get() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php:212
 Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php:62
 Drupal\Component\DependencyInjection\PhpArrayContainer->createService() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Component/DependencyInjection/Container.php:171
 Drupal\Component\DependencyInjection\Container->get() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Core/DrupalKernel.php:546
 Drupal\Core\DrupalKernel->getCachedContainerDefinition() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Core/DrupalKernel.php:891
 Drupal\Core\DrupalKernel->initializeContainer() at /Users/cmazzarago/Local_Sites/FondazionePico/fondazione_pico/web/core/lib/Drupal/Core/DrupalKernel.php:470
 Drupal\Core\DrupalKernel->boot() at phar:///usr/local/bin/cv/src/CmsBootstrap.php:251
 Civi\Cv\CmsBootstrap->bootDrupal8() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/cv/src/CmsBootstrap.php:139
 Civi\Cv\CmsBootstrap->bootCms() at phar:///usr/local/bin/cv/src/Util/BootTrait.php:130
 Civi\Cv\Command\CoreInstallCommand->_boot_cms_only() at phar:///usr/local/bin/cv/src/Util/SetupCommandTrait.php:54
 Civi\Cv\Command\CoreInstallCommand->bootSetupSubsystem() at phar:///usr/local/bin/cv/src/Command/CoreInstallCommand.php:56
 Civi\Cv\Command\CoreInstallCommand->execute() at phar:///usr/local/bin/cv/vendor/symfony/console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:850
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/cv/src/Application.php:46
 Civi\Cv\Application->doRun() at phar:///usr/local/bin/cv/vendor/symfony/console/Application.php:124
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/cv/src/Application.php:15
 Civi\Cv\Application::main() at phar:///usr/local/bin/cv/bin/cv:27
 require() at /usr/local/bin/cv:14

core:install [--settings-path [SETTINGS-PATH]] [--setup-path [SETUP-PATH]] [--src-path [SRC-PATH]] [--plugin-path [PLUGIN-PATH]] [--cms-base-url [CMS-BASE-URL]] [--lang [LANG]] [--comp [COMP]] [--ext [EXT]] [--db [DB]] [-m|--model [MODEL]] [-A|--abort] [-K|--keep] [-f|--force] [--debug-event [DEBUG-EVENT]] [--debug-model] [--level LEVEL] [-t|--test] [-U|--user USER]

```

any suggestion ??? i'm very sad :((

thanks a lot claudio.

# Answer
> 0 votes
Your --db setting might be wrong. It's not civicrm\_user:myuser, it should be myuser:mypass. Also on some systems "localhost" doesn't work and you need to use `127.0.0.1`, e.g.

`--db="mysql://mysql_user:mysql_password@127.0.0.1:3306/mydb"`

But also you don't need --db unless you need to install civi in a separate database from drupal. It will guess your drupal database.

Also you usually need to specify --cms-base-url, since otherwise it might think your website is literally `http://default`.

---
Tags: drupal, drupal-9
---


# Question
Title: Call to undefined function civicrm_initialize() in sites/all/modules/contrib/civicrm_entity/civicrm_entity.module:488
I've just updated Drupal core (to 7.75) and found my site was stuck in maintenance mode, even after it was unticked in configuration. I've had this before and always been able to get round it with a cache clear. Now though, the site won't load to let me clear the cache though the UI. I've been trying to do it through Drush and am getting the following:

```
Fatal error: Call to undefined function civicrm_initialize() in ~/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module on line 488
Drush command terminated abnormally due to an unrecoverable     [error]
error.
Error: Call to undefined function civicrm_initialize() in
~/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module,
line 488
Drush was not able to start (bootstrap) Drupal.                 [error]
Hint: This error can only occur once the database connection has
already been successfully initiated, therefore this error
generally points to a site configuration issue, and not a
problem connecting to the database.

Drush was attempting to connect to:
 Drupal version                :  7.75
 Site URI                      :  http://default
 Database driver               :  mysql
 Database hostname             :  *.*.*.*
 Database port                 :
 Database username             :  *********
 Database name                 :  *********
 Database                      :  Connected
 Default theme                 :  nexus
 Administration theme          :  seven
 PHP executable                :  /usr/local/bin/php
 PHP configuration             :  /usr/local/php56/php.ini
 PHP OS                        :  Linux
 Drush script                  :  ~/drush/drush.php
 Drush version                 :  8.4.5
 Drush temp directory          :  /tmp
 Drush configuration           :
 Drush alias files             :
 Install profile               :  standard
 Drupal root                   :  ~/public_html
 Drupal Settings File          :  sites/default/settings.php
 Site path                     :  sites/default
 File directory path           :  sites/default/files
 Private file directory path   :  sites/default/files/private
 Temporary file directory      :  tmp
 path

```

# Answer
> 1 votes
I'll guess that you've got a server with insufficient php or mysql configuration, and that in the process of your upgrade, civicrm was disabled for one reason or another.

You can probably just use sql to re-enable it with something like:

```
update system set status = 1 where name = 'civicrm'

```

And then use drush to clear all your caches.

The origin of your issue could be one of these settings in php:

post\_max\_size max\_input\_vars

or the mysql configuration of

max\_allowed\_packet

---
Tags: drupal, civicrm-entity, drush
---


# Question
Title: Is there a CiviCRM User Actions Log Feature?
I need a log of user actions due to a security breach (theft of User Information). However, according to my knowledge and research, CiviCRM does not have such a feature.

How can I access a user's **User Actions Log** data in **CiviCRM**. The information I want is as follows. Whenever the user logged into the system, opened a new individual and activity record, and made a search, what is the IP address of my site. Like. There is a feature like this in Joomla but I can't use it either. I wrote the reason in the Joomla form. I think he should keep a diary like this for security breaches and similar issues. The system below is used by Joomlan. Is it possible to adapt this for CiviCRM? Can you help me with this.

# Answer
The short answer would be "no" since CiviCRM is not responsible for authentication, the CMS is.

CiviCRM can be configured with various levels of logging, but as a general strategy, you'll want to make use of multiple tools when investigating security issues, which will depend on your individual setup.

For the specific issue of 'theft of user information', there is an extension that prevents administrators from downloading contact data unless given explicit permission, you might want your organization to use that going forward.

Other than that, if it's a bunch of data that was downloaded, then I'd comb the webserver logs for large downloads, find the originating ip and then look for matching login urls with the same ip.
> 1 votes

---
Tags: joomla, user-account, logs
---


# Question
Title: Hyperlink not working within CiviCRM emails
When I send an email on CiviCRM, and want to add a hyperlink (to a webpage for example), I've had responses from those I sent it to that the link doesn't work. I've followed the hyperlink button on the formatting tab above on emails so would like to know if there is anything else I should be doing. Thanks

# Answer
> 1 votes
CiviMail is usually (and by default) configured to mangle the links in a civimail message in order to be able to track them. I suspect you've got a configuration issue which is preventing those mangled urls from working properly.

A mangled url typically looks something like this:

https://example.org/civicrm/mailing/url?u=21189&qid=1478417

Solutions:

1. If you're in a hurry, you can just turn off the link tracking for your message.
2. CiviCRM has recently converted from a different url for such purpose (one with "extern" in the path) - if you've got an old link like that which is breaking, you probably want to update your civicrm version to fix the problem.

In any case, to help you further, it'd be useful to get details about the link that "doesn't work", i.e. provide the url of an example and also what you're seeing on the screen when following that url.

---
Tags: email
---


title: DB: No such field! Error message

text:
# Question
Title: DB: No such field! Error message
We're just a very small charity trying to put this together with limited experience.

I had set up some custom fields for the database but some changes to those fields was requested which I made and now when I run a find contact search, a list of releveant contacts will come up but if I click on a contact name I get this message:

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. DB Error: no such field

I imagine it has something to do with changing the fields. Any ideas of how to move forward with this? I only had uploaded some of our database as a test so happy to delete all of our contacts and start again but don't know how.

Thanks in advance!!

# Answer
> 1 votes
Try installing the CiviCRM Log Viewer extension (you can do that via the web interface) and then you'll be able to see more details about the specifics of the error, which are logged in a CiviCRM error log file that is otherwise not easy to access.

The 'Transaction integrity error' isn't super useful, it's evidence of a deeper issue - see: https://civicrm.stackexchange.com/search?q=Transaction+integrity+error%3A+Expected+to+find+active+frame

That deeper issue would be more easily seen via the error log.

Sometimes, if you make changes to custom fields via the web interface, it will only half-complete, leaving a mismatch between the tables in mysql and what CiviCRM thinks is there. That might be evidence of a server setup issue, for example.

The easiest solution, if it works, is to delete the fields that make up the custom fieldset, then delete the fieldset itself and start again.

---
Tags: contacts, error, database
---


# Question
Title: Workflow for new constituents. How to add a doc verification step?
Relative Noob here.

With my relatively out of the box installation I have new users joining the org via a membership contribution page.

I can use the profile-advanced settings to automatically add the people to an "active member" group once the dues are paid (either by cc or by cash/check).

That works well.

But, I now want to add a new step where a club administrator needs to verify a document for all new members.

The workflow would be something like

```
Non-Member
↓
[uses a registration/contribution page to join]
↓
If cash/check   --yes-->   They get queued in pending payment
↓                          ↙
↓   cc                  ↙   admin registers pmt
↓                     ↙
User enters a new state pending verification of document, maybe via profile-advanced-grp
↓
[Admin verifies, just like an admin can confirm payment]
↓
user is now a full active member

```

Can someone recommend some good reading material that might be helpful here? I see member rules that might be a good start

Is there an easy strategy to get an admin action working to have an admin kick a user from State-A to State-B once they verify the document?

Thanks

# Answer
> 3 votes
In similar situations, the "membership signup" form I use isn't a membership signup form at all - it's a Webform or profile, which puts someone in a "Needs Review" group.

A staff member can then go through the group that needs review, and upon approval, removes them from the group and sends them an email template that links to the "payment page", which is the "real" contribution page for membership signup.

I also use my Fast Action Links extension to streamline the process - after searching for people in "Needs Review", you can click **Accepted**, **Denied**, or **Needs More Info**, which triggers a set of actions (via CiviRules integration). E.g. selecting "Accepted" removes them from the "Needs Review" group, sends the email with the new link, adds them to an "Approved" group, and registers them for the next upcoming event, all with a single click.

# Answer
> 5 votes
One part of your flow that isn't clear is: what happens if someone registers with a cc and then is rejected? You probably don't want to have to refund a cc, right?

For a similar setup, what I did was to limit the payment method to pay later and set the instructions as "sit tight until you hear from us", and then after the validation/approval process, they were sent an invoice that they could pay by cheque or using a credit card (you can pay an invoice via cc using a direct link in the invoice if you set it properly).

The only wiring necessary was the notifications, which can be done in various ways.

---
Tags: civimember
---


title: CiviCRM 5.29.0 - import relationships

text:
# Question
Title: CiviCRM 5.29.0 - import relationships
(2020 12 02; 13:27 US/PST: I've edited this question to more accurately reflect the data available for import.)

Can anyone point me at an example of two of importing a set of relationship data (e.g., is head or member of household) between an individual contact record and a (somehow) related household contact record? I have read through the available documentation several times, and have tried the import process in several ways, all to no useful results.

I am working with a small number of records (~27) of individuals to relate to (~17) households. Each individual and household record as a unique (but related) external identifier, and all related records have a record # in common among them, as well as a unique record number assigned by CiviCRM at the time of import. This number is not available prior to the import process and is not part of the import data.

I am working with WordPress 5.5.3 / CIviCRM 5.29.0.

Here are three example records (most fields omitted):

```
ID  ID1     UniqueID          Type  Relationship    Name
15  101015  1010150           h                     Hh Name
15  101015  1010151           i     HoH             HoH name
15  101015  1010152           i     MoH             MoH name

```

Household records have UniqueID ending in '0', Head of household individual records have UniqueID ending in '1', Member of household records have UniqueID ending in 2. This field is imported as CiviCRM's ExternalID. ID and ID1 look related in this example, they are not necessarily related. The UniqueID is created from ID1, which is an increasing series.

My approach has been to import individual records first, and then household records, with attempted links to individuals. This creates new individual records rather than updating existing individual records. I've read on SE that it may work better to create Hh records first and then import individuals. I will try that and update this question with results.

Once this small subset is functioning as expected, I then have about 2,000 records to import and establish relationships among individuals, households, and organizations. TIA, DVH

# Answer
> 1 votes
So your contacts (both individuals and households) already exist in CiviCRM and you have the contact ids for all of them - all you need to do is create the relationships.

I think part of your difficulty comes from the way your data is currently structured.

Create a file of your HoH's with just the contact\_id of the individual and the household:

```
contact_id,household_id
10596,10594

```

Then at `Contacts > Import Contacts`:

* select your file
* tick 'First row contains column headers'
* select `Update` for Duplicate Contacts
* Continue

On the next page:

* map `contact_id` to `Contact ID`
* map `household_id` to `Head of Household for` `Contact ID`

Note: if `Contact ID` is not listed, go back to the previous page and make sure you select `Update`.

Run the import and you should find the relationships are created. Then repeat for MoH

However ... creating a file like that from your current one takes a little work.

Depending on your preference you could create that with Excel & Vlookup, or php/perl/etc

Alternatively since you have created external identifiers with a specific relationship between ID1 and UniqueID, you could use those:

* extract the contact\_id and ID1 for the HoH lines
* append '0' to the ID1 field (to create the external identifier for the household)
* import as above but map to `Head of Household for` `External ID`

### Update (following update of the question):

If you don't have the CiviCRM contact ids available, just use the external id's for both parties:

* extract the UniqueID and ID1 for the HoH lines
* append '0' to the ID1 field (to create the external identifier for the household)
* map `UniqueID` to `External ID`
* map modified ID1 to `Head of Household for` `External ID`

This was based on you already having imported the contacts and just needing to import the relationships. If you are starting from scratch you can import household and HoH in one go, then import MoH.

# Answer
> 1 votes
After reading other posts in SE concerning the import process and some experimentation, I have resolved my problem by revising the import process and modifying the imported data:

1. I changed the import order to:

* Household data
    * Person 1 data
    * Person 2 data
2. I added a column to each of the files, "HouseholdName" and used it to provide the relationship import linkage. The revised table is, thus:

```
ID  ID1     UniqueID    Type  Relationship    Name       HouseholdName
15  101015  1010150     h                                Hhname
15  101015  1010151     i     HoH             HoH name   Hhname
15  101015  1010152     i     MoH             MoH name   Hhhame

```

With these changes, I am able to import my data, with the appropriate relationships established as part of the import process.

---
Tags: relationships, data-import
---