Multisite domain group fails on 5.20.0
Overview
After an upgrade to 5.20.0, with WP multisite using the Multisite Permissioning extension version 2.7.3 (https://github.com/eileenmcnaughton/org.civicrm.multisite), users roles which rely on that extension in a domain group that has greater than 20,736 records fail to load contacts in CiviCRM. Any amount above this will return errors. They cannot even view their own contact.
On 5.19.2 and multisite permisisoning ext version 2.7.2 we had 69,713 records in a domain group and it worked.
We tried reverting to the 2.7.2 of this extension but it had no effect.
We know that it is a combination of version 5.20.0 and the multisite extension because we have other user roles at the county level that rely on 2nd degree relationship permissioning only and not the 'view all contact in domain' permission of the multisite extension for instance. Conversely, users who are administrators have no issue using the effected sites that have greater than 20,736 records in the domain group.
We tried to increase the maximum size of temporary tables in MySQL but it had no effect.
I think this is a core issue as the extension worked in 5.19.2. But feel free to move this issue to https://github.com/eileenmcnaughton/org.civicrm.multisite/issues if that makes more sense.
@eileen @kcristiano @seamuslee
Reproduction steps
- Put more than 20736 records into a multisite permission group
- Make that the multisite domain group
- Do any search
- Receive the following errors:
This error occurred after an advanced search
Database Error Code: The table 'civicrm_tmp_e_aclccache_d12b740b9b1f6940027087701e827d95' is full, 1114
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_tmp_e_aclccache_d12b740b9b1f6940027087701e827d95 (user_id, contact_id, operation) SELECT DISTINCT 168522 as user_id, contact_a.id as contact_id, 'Edit' as operation
FROM civicrm_contact contact_a LEFT JOIN my_relationships_168522_75879 permrelationships
ON (contact_a.id = permrelationships.contact_id)
LEFT JOIN civicrm_group_contact multisiteGroupTable ON contact_a.id = multisiteGroupTable.contact_id
WHERE ((multisiteGroupTable.group_id IN (32,133) AND multisiteGroupTable.status IN ('Added') AND contact_a.is_deleted = 0) OR permrelationships.contact_id IS NOT NULL ) AND (contact_a.is_deleted = 0) [nativecode=1114 ** The table 'civicrm_tmp_e_aclccache_d12b740b9b1f6940027087701e827d95' is full]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_tmp_e_aclccache_d12b740b9b1f6940027087701e827d95 (user_id, contact_id, operation) SELECT DISTINCT 168522 as user_id, contact_a.id as contact_id, 'Edit' as operation
FROM civicrm_contact contact_a LEFT JOIN my_relationships_168522_75879 permrelationships
ON (contact_a.id = permrelationships.contact_id)
LEFT JOIN civicrm_group_contact multisiteGroupTable ON contact_a.id = multisiteGroupTable.contact_id
WHERE ((multisiteGroupTable.group_id IN (32,133) AND multisiteGroupTable.status IN ('Added') AND contact_a.is_deleted = 0) OR permrelationships.contact_id IS NOT NULL ) AND (contact_a.is_deleted = 0) [nativecode=1114 ** The table 'civicrm_tmp_e_aclccache_d12b740b9b1f6940027087701e827d95' is full]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_tmp_e_aclccache_d12b740b9b1f6940027087701e827d95 (user_id, contact_id, operation) SELECT DISTINCT 168522 as user_id, contact_a.id as contact_id, 'Edit' as operation
FROM civicrm_contact contact_a LEFT JOIN my_relationships_168522_75879 permrelationships
ON (contact_a.id = permrelationships.contact_id)
LEFT JOIN civicrm_group_contact multisiteGroupTable ON contact_a.id = multisiteGroupTable.contact_id
WHERE ((multisiteGroupTable.group_id IN (32,133) AND multisiteGroupTable.status IN ('Added') AND contact_a.is_deleted = 0) OR permrelationships.contact_id IS NOT NULL ) AND (contact_a.is_deleted = 0) [nativecode=1114 ** The table 'civicrm_tmp_e_aclccache_d12b740b9b1f6940027087701e827d95' is full]"]
)
Current behavior
Unable to find contacts in CiviCRM rendering it unusable for users relying on multisite permissioning extension.
Environment information
- __Browser: Any
- __CiviCRM: 5.20.0
- __PHP: 7.2.25-1+ubuntu18.04.1+deb.sury.org+1
- __CMS: WordPress 5.3
- __Database: (Ubuntu) v5.7.28
- __Web Server: Apache/2.4.41 (Ubuntu)