Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.7
-
Fix Version/s: 4.4.2
-
Component/s: Core CiviCRM
-
Labels:None
Description
I have a custom group that I edit to change which contact subtype can have it (removed a bunch, the list of like under is correct). Got the popup, clicked ok:
Can't update table 'civicrm_contact' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
It seems to be CRM_Contact_BAO_ContactType->deleteCustomRowsOfSubtype
DELETE custom.*
FROM civicrm_value_klant_profiel_23 custom
INNER JOIN civicrm_contact ON civicrm_contact.id = custom.entity_id
WHERE (civicrm_contact.contact_sub_type LIKE '%Medewerker%' OR civicrm_contact.contact_sub_type LIKE '%Partner_Medewerker%' OR civicrm_contact.contact_sub_type LIKE '%Pers_Medewerker%' OR civicrm_contact.contact_sub_type LIKE '%Leverancier_medewerker%' OR civicrm_contact.contact_sub_type LIKE '%Overheid_medewerker%')
[nativecode=1442 ** Can't update table 'civicrm_contact' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.]
I haven't been able to find which stored function/trigger is causing the trouble.