Answers.Body: <p>Looks like this patch resolved my issue <a href="https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/23087.patch" rel="nofollow noreferrer">https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/23087.patch</a></p>
  <p>from here: <a href="https://github.com/civicrm/civicrm-core/pull/23087" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/23087</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T13:03:35.470Z
Answers.Text: Note that in the comments and the lab ticket that patch isn't really the right solution because there are going to be other places that also expect a price field to be present - you need to update the line items in your database to have a price field - which field depends on what the financial type is. There is no perfect recipe, but the lab ticket gives some ideas.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T17:24:02.927Z
Answers.Text: @Demerit do you expect that a solution will be offered that does not need a database update? I was using webform_civicrm on D7 and I believe it caused my issue
Answers.UserDisplayName: Zachary
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T17:43:27.640Z
Answers.Text: webform d7 had an update for it: https://github.com/colemanw/webform_civicrm/pull/621, just I'm not sure it's a complete fix. Events have no default price set and if you have two line items on a contribution that end up with the same price field civi doesn't like that. But that patch should help.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T17:43:43.730Z
Answers.Text: But to fix the existing records, you need to update them in the db.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T17:44:58.333Z
Answers.Text: Thanks for your assistance, I'll make sure to do so.
Answers.UserDisplayName: Zachary
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T20:38:49.037Z
Answers.Text: @Demerit speaking of the above, do you have a suggestion for how to fix the missing price field association? In our case, we used webform and created memberships/contributions and some event registrations.
Answers.UserDisplayName: Zachary
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T21:10:54.653Z
Answers.Text: You can use this to get the default ids: https://lab.civicrm.org/dev/core/-/issues/3150#note_70991. And this might help: https://civicrm.stackexchange.com/questions/41629/when-trying-to-save-a-new-contribution-the-civi-logo-just-spins-and-spins/41630#41630
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-09T00:35:26.410Z
Answers.LastActivityDate: 2022-08-09T00:35:26.410Z
Answers.UserDisplayName: Zachary
Body: <p>we're on Drupal 7.x and CiviCRM 5.52.2. We recently did a rather large upgrade and also upgraded to the iATS 1.7.4 CiviCRM Extension.</p>
  <p>On certain contribution tabs on contact records, we're getting a &quot;Network Error&quot;. Upon further investigation we're seeing the PHP error in Drupal log:</p>
  <pre><code>TypeError: Argument 1 passed to CRM_Financial_BAO_Order::setPriceSetID() must be of the type integer, null given, called in sites/all/modules/civicrm/CRM/Financial/BAO/Order.php on line 910 in CRM_Financial_BAO_Order-&gt;setPriceSetID() (line 471 of /sites/all/modules/civicrm/CRM/Financial/BAO/Order.php)
  </code></pre>
  <p>Any clue what might be missing/incorrect in the records in the table? Appreciate the help. Can post more info if needed.</p>
  <p>Edit, looks like this might be a duplicate of <a href="https://lab.civicrm.org/dev/core/-/issues/3150" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/3150</a></p>
  <p>Edit2: Looks like this patch resolved my issue <a href="https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/23087.patch" rel="nofollow noreferrer">https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/23087.patch</a></p>
  <p>from here: <a href="https://github.com/civicrm/civicrm-core/pull/23087" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/23087</a></p>
  
Tags: <civicontribute>
Title: Network Error - TypeError: Argument 1 passed to CRM_Financial_BAO_Order::setPriceSetID() must be of the type integer, null given
ThreadText: # Network Error - TypeError: Argument 1 passed to CRM_Financial_BAO_Order::setPriceSetID() must be of the type integer, null given
  
  (Asked by: username_0 on 2022-08-08)
  
  we're on Drupal 7.x and CiviCRM 5.52.2. We recently did a rather large upgrade and also upgraded to the iATS 1.7.4 CiviCRM Extension.
  
  On certain contribution tabs on contact records, we're getting a "Network Error". Upon further investigation we're seeing the PHP error in Drupal log:
  
  ```
  TypeError: Argument 1 passed to CRM_Financial_BAO_Order::setPriceSetID() must be of the type integer, null given, called in sites/all/modules/civicrm/CRM/Financial/BAO/Order.php on line 910 in CRM_Financial_BAO_Order->setPriceSetID() (line 471 of /sites/all/modules/civicrm/CRM/Financial/BAO/Order.php)
  
  ```
  
  Any clue what might be missing/incorrect in the records in the table? Appreciate the help. Can post more info if needed.
  
  Edit, looks like this might be a duplicate of <https://lab.civicrm.org/dev/core/-/issues/3150>
  
  Edit2: Looks like this patch resolved my issue <https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/23087.patch>
  
  from here: <https://github.com/civicrm/civicrm-core/pull/23087>
  
  **Tags:** civicontribute
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-08-09. Score: 0 | Accepted answer
  
  Looks like this patch resolved my issue <https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/23087.patch>
  
  from here: <https://github.com/civicrm/civicrm-core/pull/23087>
  
  > **Comments:**
  > **username_1**: Note that in the comments and the lab ticket that patch isn't really the right solution because there are going to be other places that also expect a price field to be present - you need to update the line items in your database to have a price field - which field depends on what the financial type is. There is no perfect recipe, but the lab ticket gives some ideas.  
  > **username_0**: @username_1 do you expect that a solution will be offered that does not need a database update? I was using webform_civicrm on D7 and I believe it caused my issue  
  > **username_1**: webform d7 had an update for it: https://github.com/colemanw/webform_civicrm/pull/621, just I'm not sure it's a complete fix. Events have no default price set and if you have two line items on a contribution that end up with the same price field civi doesn't like that. But that patch should help.  
  > **username_1**: But to fix the existing records, you need to update them in the db.  
  > **username_0**: Thanks for your assistance, I'll make sure to do so.  
  > **username_0**: @username_1 speaking of the above, do you have a suggestion for how to fix the missing price field association? In our case, we used webform and created memberships/contributions and some event registrations.  
  > **username_1**: You can use this to get the default ids: https://lab.civicrm.org/dev/core/-/issues/3150#note_70991. And this might help: https://civicrm.stackexchange.com/questions/41629/when-trying-to-save-a-new-contribution-the-civi-logo-just-spins-and-spins/41630#41630  
  
  ---
  
  