4

Initially I had a warning that the Price Set was in use, with a useful link to the page in question.

I then removed the Price Set from the Contribution page in question, but I am now getting the same message ie

Unable to delete the 'xxx' Price Field - it is currently in use by one or more active events or contribution pages or contributions or event templates. If you no longer want to use this price set, click the contribution page title below, and modify the Amounts or Membership tab configuration.

1 Answer 1

4

Price sets relating to any contribution record(apart from contribution pages) also need to be deleted before removing any fields from the priceset.

Since Contribution need this field information to show them on viewing those contribution record, it doesn't let us to delete the fields or pricesets related to them.

To know what contribution or membership record are related to pricesets - execute this query -

SELECT DISTINCT cli.entity_table, cli.entity_id
FROM      civicrm_line_item cli
LEFT JOIN civicrm_price_field cpf ON cli.price_field_id = cpf.id
WHERE     cpf.price_set_id = <your_price_set_id>
2
  • Okay. So what stumped me was that none of those payments involved the Price Field I was trying to remove. I understand why it wouldn't want me removing fields that have values in the _line_item table, but in this case there were none. If you can get a PR done to let this happen it would remove a modicum of pain for users in same situation. Thx
    – petednz - fuzion
    Commented Jul 31, 2017 at 5:40
  • What if you don't want to see them any more :-) Could you just delete the priceset? Commented Nov 11, 2020 at 23:16

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.