Answers.Body: <p>After two day of try and error I got the problem: the new version get from the keypad as decimal separator the . instead the , and civicrm doesn't manage it. Also if I put only the integer part of without the decimal part it assume the .
  I'm not sure if there something different in the new version about regional settings, but I'm happy to have solve it</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-26T19:12:57.447Z
Answers.Text: Ah good job. There was https://lab.civicrm.org/dev/core/-/issues/2756 but it looks like it was fixed already, and I don't see the problem on https://dmaster.demo.civicrm.org.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-26T19:16:50.643Z
Answers.Text: I have this problem with 5.41.2 and also with the last release 5.42.1 :(
Answers.UserDisplayName: pk825
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-26T18:20:35.623Z
Answers.LastActivityDate: 2021-10-26T18:20:35.623Z
Answers.UserDisplayName: pk825
Answers.Body: <p>You have a line item that doesn't have a financial type. Check your financial types and if using price sets check the financial types on them.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-25T15:18:45.623Z
Answers.Text: I have just a priceset, and if I use it the system works fine. The financial type seems good (the related table is very simple) and I try to save again it without any success, the problem occurs with all the financial types. How could I check if the data is not correct?
Answers.UserDisplayName: pk825
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-25T15:44:50.420Z
Answers.Text: I have a log with more information htat add to the question
Answers.UserDisplayName: pk825
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-25T18:29:11.407Z
Answers.Text: Could it be related to negative contribution? I use this type of contribute in order to manage costs
Answers.UserDisplayName: pk825
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-25T13:01:59.430Z
Answers.LastActivityDate: 2021-10-25T13:01:59.430Z
Answers.UserDisplayName: Demerit
Body: <p>After upgrading to 5.41.2 I have a problem when creating a new contribute.
  Any suggestion in order to manage the error?</p>
  <p>error log:</p>
  <pre><code>Versione di WordPress 5.8.1
  Plugin corrente: CiviCRM (versione 5.41.2)
  Versione PHP 7.4.23
  
  
  
  Dettagli dell'errore
  ====================
  Un errore di E_ERROR è stato causato nella linea 390 del file /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php. Messaggio di errore: Uncaught TypeError: Argument 1 passed to CRM_Financial_BAO_Order::isOverrideLineItemFinancialType() must be of the type int, null given, called in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 817 and defined in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php:390
  Stack trace:
  #0 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(817): CRM_Financial_BAO_Order-&gt;isOverrideLineItemFinancialType(NULL)
  #1 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(700): CRM_Financial_BAO_Order-&gt;calculateLineItems()
  #2 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php(926): CRM_Financial_BAO_Order-&gt;getLineItems()
  #3 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php(1600): CRM_Contribute_Form_Contribution::formRule(Array, Array, Object(CRM_Contri
  </code></pre>
  <p>Other log</p>
  <pre><code>Notice: Trying to access array offset on value of type bool in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1633
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 311
  
  Notice: Trying to access array offset on value of type null in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 311
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 313
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 331
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1637
  
  Fatal error: Uncaught TypeError: Argument 1 passed to CRM_Financial_BAO_Order::isOverrideLineItemFinancialType() must be of the type int, null given, called in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 817 and defined in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php:390 Stack trace: #0 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(817): CRM_Financial_BAO_Order-&gt;isOverrideLineItemFinancialType(NULL) #1 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(700): CRM_Financial_BAO_Order-&gt;calculateLineItems() #2 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php(926): CRM_Financial_BAO_Order-&gt;getLineItems() #3 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php(1600): CRM_Contribute_Form_Contribution::formRule(Array, Array, Object(CRM_Contri in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 390
  </code></pre>
  
Tags: <civicontribute><contributions>
Title: SOLVED - Error on new contribute after upgrade to 5.41.2
ThreadText: # SOLVED - Error on new contribute after upgrade to 5.41.2
  
  (Asked by: username_0 on 2021-10-24)
  
  After upgrading to 5.41.2 I have a problem when creating a new contribute.
  Any suggestion in order to manage the error?
  
  error log:
  
  ```
  Versione di WordPress 5.8.1
  Plugin corrente: CiviCRM (versione 5.41.2)
  Versione PHP 7.4.23
  
  Dettagli dell'errore
  ====================
  Un errore di E_ERROR è stato causato nella linea 390 del file /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php. Messaggio di errore: Uncaught TypeError: Argument 1 passed to CRM_Financial_BAO_Order::isOverrideLineItemFinancialType() must be of the type int, null given, called in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 817 and defined in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php:390
  Stack trace:
  #0 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(817): CRM_Financial_BAO_Order->isOverrideLineItemFinancialType(NULL)
  #1 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(700): CRM_Financial_BAO_Order->calculateLineItems()
  #2 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php(926): CRM_Financial_BAO_Order->getLineItems()
  #3 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php(1600): CRM_Contribute_Form_Contribution::formRule(Array, Array, Object(CRM_Contri
  
  ```
  
  Other log
  
  ```
  Notice: Trying to access array offset on value of type bool in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1633
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 311
  
  Notice: Trying to access array offset on value of type null in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 311
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 313
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/LineItem.php on line 331
  
  Notice: Undefined index: in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1637
  
  Fatal error: Uncaught TypeError: Argument 1 passed to CRM_Financial_BAO_Order::isOverrideLineItemFinancialType() must be of the type int, null given, called in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 817 and defined in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php:390 Stack trace: #0 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(817): CRM_Financial_BAO_Order->isOverrideLineItemFinancialType(NULL) #1 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php(700): CRM_Financial_BAO_Order->calculateLineItems() #2 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php(926): CRM_Financial_BAO_Order->getLineItems() #3 /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php(1600): CRM_Contribute_Form_Contribution::formRule(Array, Array, Object(CRM_Contri in /home/gragorg/staging.grag.org/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Order.php on line 390
  
  ```
  
  **Tags:** civicontribute, contributions
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2021-10-26. Score: 1
  
  After two day of try and error I got the problem: the new version get from the keypad as decimal separator the . instead the , and civicrm doesn't manage it. Also if I put only the integer part of without the decimal part it assume the .
  I'm not sure if there something different in the new version about regional settings, but I'm happy to have solve it
  
  > **Comments:**
  > **username_1**: Ah good job. There was https://lab.civicrm.org/dev/core/-/issues/2756 but it looks like it was fixed already, and I don't see the problem on https://dmaster.demo.civicrm.org.  
  > **username_0**: I have this problem with 5.41.2 and also with the last release 5.42.1 :(  
  
  ---
  
  ### Answer by username_1 on 2021-10-25. Score: 0
  
  You have a line item that doesn't have a financial type. Check your financial types and if using price sets check the financial types on them.
  
  > **Comments:**
  > **username_0**: I have just a priceset, and if I use it the system works fine. The financial type seems good (the related table is very simple) and I try to save again it without any success, the problem occurs with all the financial types. How could I check if the data is not correct?  
  > **username_0**: I have a log with more information htat add to the question  
  > **username_0**: Could it be related to negative contribution? I use this type of contribute in order to manage costs  
  
  ---
  
  