I am using Webform with CiviCRM to enable a family to renew their memberships. On many of the submissions when I click View Contribution I get the following error:

CiviCRM_API3_Exception: "Expected one PriceSet but found 25"

#0 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Form/ContributionView.php(158): civicrm_api3("PriceSet", "getsingle", (Array:2))
#1 /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php(549): CRM_Contribute_Form_ContributionView->preProcess()
#2 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#3 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_ContributionView), "display")
#4 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_ContributionView), "display")
#5 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#6 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(214): CRM_Core_Controller->run()
#7 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(286): CRM_Contribute_Page_Tab->view()
#8 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(310): CRM_Contribute_Page_Tab->run((Array:4), NULL)
#9 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#10 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#11 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#12 [internal function](): civicrm_invoke("contact", "view", "contribution")
#13 /var/www/html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#14 /var/www/html/index.php(21): menu_execute_active_handler()
#15 {main}
Sorry but we are not able to provide this at the moment.
Expected one PriceSet but found 25

Return to home page.

It does not happen on all submissions and I have not been able to diagnose the cause. Has anyone else experienced this issue?

  • I wanted to reformat the error myself but could not see how to do it. Could you let me know what I should do? Mar 19, 2017 at 22:15
  • I get the same api error in webform submissions in the drupal dblog: CiviCRM_API3_Exception: "Expected one PriceSet but found 25". I happens right after updating updating from 4.7.10 to 4.7.22. I can see the contributions in civicrm (but so far I get no receipts).. I am not using pricesets (and not using the number 25 anywhere)
    – commonpike
    Jul 29, 2017 at 15:33

2 Answers 2


Webform doesn't use pricesets. Are you using a normal fully-configured contribution page that has a priceset? If so, try a simple contribution page as described here: https://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration#WebformCiviCRMIntegration-Acceptingpaymentsthroughawebform

  • 1
    I am using a simple contribution page exactly as described in the documentation. Mar 25, 2017 at 11:40

I do not know what your set up is but the error is from an API call (entity PriceSet action getsingle) and it means it expects to find only one price set but it gets many. Can you check in your set up of the contribution page if you are using a price set and if it is set up properly?

  • As I have said before I am not using price sets. You are nevertheless correct in stating that there are multiple line items because there are multiple memberships being paid. It appears to be an error from what I can tell. Jul 30, 2017 at 22:45

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.