0

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

1 Answer 1

0

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

7
  • 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.
    – Demerit
    Commented Aug 9, 2022 at 13:03
  • @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
    – Zachary
    Commented Aug 9, 2022 at 17:24
  • 1
    webform d7 had an update for it: 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.
    – Demerit
    Commented Aug 9, 2022 at 17:43
  • 1
    But to fix the existing records, you need to update them in the db.
    – Demerit
    Commented Aug 9, 2022 at 17:43
  • 1
    You can use this to get the default ids: lab.civicrm.org/dev/core/-/issues/3150#note_70991. And this might help: civicrm.stackexchange.com/questions/41629/…
    – Demerit
    Commented Aug 9, 2022 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.