Answers.Body: <p>It's a known problem that mariadb isn't very usable with multilingual with STRICT_TRANS_TABLES. There's a thought about how it could be solved at <a href="https://github.com/civicrm/civicrm-core/pull/22647#issuecomment-1026131715" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/22647#issuecomment-1026131715</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-21T16:41:27.657Z
Answers.Text: I did not understand: if I am using MariaDB (my current version is 10.6.9), do I have to disable STRICT_TRANS_TABLES.
  I have upgraded to CiviCRM latest version (5.52.2) and `civicrm_price_set` trigggers are 
  `IF NEW.title_de_DE IS NOT NULL THEN SET NEW.title_it_IT = NEW.title_de_DE; ELSEIF ...`
  shouldn't they be updated with your change?
Answers.UserDisplayName: masetto
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-21T18:14:23.483Z
Answers.Text: Yes for now you have to disable STRICT_TRANS_TABLES. The trigger isn't really the problem it's that the schema has no default, which causes a problem here.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-06T19:49:43.067Z
Answers.LastActivityDate: 2022-07-06T19:49:43.067Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>Is this related to <a href="https://civicrm.stackexchange.com/questions/42223/db-error-uknown-error-when-a-new-profile-is-created-in-multilingual-civicrm-s">DB Error : Uknown error (When a new profile is created in multilingual CiviCRM setup)</a> ?</p>
  <p>A solution could be to set the _fr_FR columns to NULL (if they are NOT NULL now)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-12T12:34:23.967Z
Answers.LastActivityDate: 2022-07-12T12:34:23.967Z
Answers.UserDisplayName: AlainB
Body: <p>I'm using CiviCRM 5.50.4 on Drupal 7 with MariaDB.
  The NGO I volunteer for uses French language.
  When a user creates an event, we have the following error (debugging mode):</p>
  <pre><code>UserInfo    INSERT INTO `civicrm_price_set_fr_FR` (`name` , `title` , `is_active` , `extends` , `financial_type_id` , `is_quick_config` , `is_reserved` , `min_amount` ) VALUES ('apprice_set_508' , 'AP [Copie id 508]' , 1 , '1' , 4 , 1 , 0 , 0.00 ) [nativecode=1423 ** Field of view 'drupal.civicrm_price_set_fr_FR' underlying table doesn't have a default value]
  </code></pre>
  <p>Thanks to PhpMyadmin, I discovered the <code>civicrm_price_set_fr_FR</code> is a view based on the table <code>civicrm_price_set</code> and two of the view fields don't have a default value.</p>
  <p><strong>Question 1</strong> - I identified two resolution possibilities:</p>
  <ol>
  <li>I could set MariaDb to ignore that with the STRICT_TRANS_TABLES parameter - but it means not catching abnormal queries anymore</li>
  <li>I could work to set a default value - but I still haven't figure out how to do so</li>
  </ol>
  <p>Any advice?</p>
  <p><strong>Question 2</strong> - Despite this error message, the actual issue is that I can't register Contacts on new Events since I can't save mandatory pricing information: I don't know if the above issue is the root cause of that or equally a consequence of another issue ...</p>
  <p><strong>Question 3</strong> - Should I, someday, report this as a bug or an evolution request to avoid this issue to happen to other users?</p>
  <p>Thanks for your help, have a nice day!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-11T18:15:08.403Z
Comments.Text: Thanks Demerit for your answer.
  Indeed, I disabled the STRICT_TRANS_TABLES option and the issue disapeared. Let's hope disabling this safety won't let actual problems happend ...
Comments.UserDisplayName: Romain Dub
Tags: <civievent><mysql><drupal-7><mariadb>
Title: MariaDB "underlying table doesn't have a default value" on event creation
ThreadText: # MariaDB "underlying table doesn't have a default value" on event creation
  
  (Asked by: username_0 on 2022-07-06)
  
  I'm using CiviCRM 5.50.4 on Drupal 7 with MariaDB.
  The NGO I volunteer for uses French language.
  When a user creates an event, we have the following error (debugging mode):
  
  ```
  UserInfo    INSERT INTO `civicrm_price_set_fr_FR` (`name` , `title` , `is_active` , `extends` , `financial_type_id` , `is_quick_config` , `is_reserved` , `min_amount` ) VALUES ('apprice_set_508' , 'AP [Copie id 508]' , 1 , '1' , 4 , 1 , 0 , 0.00 ) [nativecode=1423 ** Field of view 'drupal.civicrm_price_set_fr_FR' underlying table doesn't have a default value]
  
  ```
  
  Thanks to PhpMyadmin, I discovered the `civicrm_price_set_fr_FR` is a view based on the table `civicrm_price_set` and two of the view fields don't have a default value.
  
  **Question 1** - I identified two resolution possibilities:
  
  1. I could set MariaDb to ignore that with the STRICT\_TRANS\_TABLES parameter - but it means not catching abnormal queries anymore
  2. I could work to set a default value - but I still haven't figure out how to do so
  
  Any advice?
  
  **Question 2** - Despite this error message, the actual issue is that I can't register Contacts on new Events since I can't save mandatory pricing information: I don't know if the above issue is the root cause of that or equally a consequence of another issue ...
  
  **Question 3** - Should I, someday, report this as a bug or an evolution request to avoid this issue to happen to other users?
  
  Thanks for your help, have a nice day!
  
  **Tags:** civievent, mysql, drupal-7, mariadb
  
  > **Comments:**
  > **username_0**: Thanks username_1 for your answer. Indeed, I disabled the STRICT_TRANS_TABLES option and the issue disapeared. Let's hope disabling this safety won't let actual problems happend ...  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-07-06. Score: 2 | Accepted answer
  
  It's a known problem that mariadb isn't very usable with multilingual with STRICT\_TRANS\_TABLES. There's a thought about how it could be solved at <https://github.com/civicrm/civicrm-core/pull/22647#issuecomment-1026131715>
  
  > **Comments:**
  > **username_2**: I did not understand: if I am using MariaDB (my current version is 10.6.9), do I have to disable STRICT_TRANS_TABLES. I have upgraded to CiviCRM latest version (5.52.2) and `civicrm_price_set` trigggers are  `IF NEW.title_de_DE IS NOT NULL THEN SET NEW.title_it_IT = NEW.title_de_DE; ELSEIF ...` shouldn't they be updated with your change?  
  > **username_1**: Yes for now you have to disable STRICT_TRANS_TABLES. The trigger isn't really the problem it's that the schema has no default, which causes a problem here.  
  
  ---
  
  ### Answer by username_3 on 2022-07-12. Score: 0
  
  Is this related to [DB Error : Uknown error (When a new profile is created in multilingual CiviCRM setup)](https://civicrm.stackexchange.com/questions/42223/db-error-uknown-error-when-a-new-profile-is-created-in-multilingual-civicrm-s) ?
  
  A solution could be to set the \_fr\_FR columns to NULL (if they are NOT NULL now)
  
  
  ---
  
  