Body: <p>I have had and solved an error before where MySQL reports &quot;Can't update table 'civicrm_contact' in stored function/trigger because it is already used by statement which invoked this stored function/trigger&quot;. However, in those cases the error was for all transactions. I am getting the same error in my logs but only for some contacts and not others.</p>
  <p>I am now seeing the problem when a new new contribution is made by a user of the website for a membership. These users do not have CiivCRM or  Drupal admin rights.</p>
  <p>I have tried to analyze what is different between contacts that manifest the problem and those that do not. I cannot find a trend. Other contacts that were imported at the time can have donations applied to them, there is no changed based on <em>Financial Types</em> or <em>Payment Method</em>.</p>
  <p>The complete error message coming from the log file in ConfigandLog looks like this:</p>
  <p>db_error: message=&quot;DB Error: unknown error&quot; code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix=&quot;&quot; info=&quot;INSERT INTO <code>civicrm_contribution</code> (<code>contact_id</code> , <code>financial_type_id</code> , <code>payment_instrument_id</code> , <code>receive_date</code> , <code>non_deductible_amount</code> , <code>total_amount</code> , <code>fee_amount</code> , <code>net_amount</code> , <code>trxn_id</code> , <code>invoice_number</code> , <code>currency</code> , <code>cancel_date</code> , <code>cancel_reason</code> , <code>receipt_date</code> , <code>thankyou_date</code> , <code>source</code> , <code>amount_level</code> , <code>is_pay_later</code> , <code>contribution_status_id</code> , <code>check_number</code> , <code>campaign_id</code> , <code>tax_amount</code> ) VALUES ( 84941 ,  4 ,  7 ,  20230108161500 ,  1 ,  1 ,  0 ,  1 ,  NULL , 'INV_116130' , 'USD' ,  NULL ,  NULL ,  NULL ,  NULL , 'This is a test' , 'Contribution Amount - 1' ,  0 ,  1 ,  NULL ,  NULL ,  0 )  [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.]&quot;</p>
  <p>I have rebuilt the triggers, deleted the triggers and added them back, and upgragraed CiviCRM to 5.56.2.</p>
  <p>The database for Drupal and CiviCRM are hosting on Amazon Aurora (MySQL).  I have turned on audit logs and do not see anything in the logs that help understand this issue.</p>
  <p>Any help with figuring this out is greatly appreciated.</p>
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-10T14:03:29.870Z
Comments.Text: Do you have logging enabled?  If so, try disabling and re-enabling that.  Logging uses triggers.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-15T18:16:46.483Z
Comments.Text: @Aidan, thank you for the idea.  We are not using logging because we are in a multilingual environment.  Thanks!
Comments.UserDisplayName: Drupal Learner
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-16T14:17:32.337Z
Comments.Text: Ah! It's always worth mentioning that you are running mutlilingual.  That makes various changes to the database schema etc and has various unique 'features'!  I don't use that but I think it has some things implemented with triggers.  I'd suggest updating the question to include this information in case readers don't get as far as these comments.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-18T01:45:42.467Z
Comments.Text: barely related, but i spotted on chat a discussion about bgm having a solution for logging on multilanguage sites
Comments.UserDisplayName: petednz - fuzion
Tags: <contributions><mysql><multilingual>
Title: Cannot Add Contributions for Some Contacts
ThreadText: # Cannot Add Contributions for Some Contacts
  
  (Asked by: username_0 on 2023-01-08)
  
  I have had and solved an error before where MySQL reports "Can't update table 'civicrm\_contact' in stored function/trigger because it is already used by statement which invoked this stored function/trigger". However, in those cases the error was for all transactions. I am getting the same error in my logs but only for some contacts and not others.
  
  I am now seeing the problem when a new new contribution is made by a user of the website for a membership. These users do not have CiivCRM or username_0 admin rights.
  
  I have tried to analyze what is different between contacts that manifest the problem and those that do not. I cannot find a trend. Other contacts that were imported at the time can have donations applied to them, there is no changed based on *Financial Types* or *Payment Method*.
  
  The complete error message coming from the log file in ConfigandLog looks like this:
  
  db\_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM\_Core\_Error::exceptionHandler prefix="" info="INSERT INTO `civicrm_contribution` (`contact_id` , `financial_type_id` , `payment_instrument_id` , `receive_date` , `non_deductible_amount` , `total_amount` , `fee_amount` , `net_amount` , `trxn_id` , `invoice_number` , `currency` , `cancel_date` , `cancel_reason` , `receipt_date` , `thankyou_date` , `source` , `amount_level` , `is_pay_later` , `contribution_status_id` , `check_number` , `campaign_id` , `tax_amount` ) VALUES ( 84941 , 4 , 7 , 20230108161500 , 1 , 1 , 0 , 1 , NULL , 'INV\_116130' , 'USD' , NULL , NULL , NULL , NULL , 'This is a test' , 'Contribution Amount - 1' , 0 , 1 , NULL , NULL , 0 ) [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 have rebuilt the triggers, deleted the triggers and added them back, and upgragraed CiviCRM to 5.56.2.
  
  The database for username_0 and CiviCRM are hosting on Amazon Aurora (MySQL). I have turned on audit logs and do not see anything in the logs that help understand this issue.
  
  Any help with figuring this out is greatly appreciated.
  
  Thanks!
  
  **Tags:** contributions, mysql, multilingual
  
  > **Comments:**
  > **username_1**: Do you have logging enabled?  If so, try disabling and re-enabling that.  Logging uses triggers.  
  > **username_0**: @username_1, thank you for the idea.  We are not using logging because we are in a multilingual environment.  Thanks!  
  > **username_1**: Ah! It's always worth mentioning that you are running mutlilingual.  That makes various changes to the database schema etc and has various unique 'features'!  I don't use that but I think it has some things implemented with triggers.  I'd suggest updating the question to include this information in case readers don't get as far as these comments.  
  > **username_2**: barely related, but i spotted on chat a discussion about bgm having a solution for logging on multilanguage sites  
  
  ---
  
  ## 0 answers
  
  