Drupal 9.2.6 CiviCRM 5.41.2
I imported some contributions via the SQL database (there's 16k+ so I don't want to use the UI) but I cannot edit or add a contribution. The triangle just spins, and there are two similar errors appearing in the logs:
TypeError: Return value of CRM_Financial_BAO_Order::getDefaultPriceFieldID() must be of the type int, null returned in CRM_Financial_BAO_Order->getDefaultPriceFieldID() (line 671 of /home/XXXX/www/www/vendor/civicrm/civicrm-core/CRM/Financial/BAO/Order.php)
Notice: Trying to access array offset on value of type null in CRM_Financial_BAO_Order->getDefaultPriceFieldID() (line 671 of /home/XXXX/www/www/vendor/civicrm/civicrm-core/CRM/Financial/BAO/Order.php)
When I imported the data, I filled the following tables (not in this order, necessarily):
I've seen a similar question recently with the same sort of error code but the solution doesn't help (none of the rows in the line_item table have NULL for either price_field or price_field_value) and I've disabled the webform to verify that it's not related to that.
Is there anywhere else I should've imported data, or anywhere else in the tables where I should be checking the price_field/price_field_value?
I'm really stuck with this one! Any help would be much appreciated :)