Answers.Body: <p>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: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration#WebformCiviCRMIntegration-Acceptingpaymentsthroughawebform" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration#WebformCiviCRMIntegration-Acceptingpaymentsthroughawebform</a> </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-25T11:40:15.437Z
Answers.Text: I am using a simple contribution page exactly as described in the documentation.
Answers.UserDisplayName: Martin Fuggle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-24T09:39:33.800Z
Answers.LastActivityDate: 2017-03-24T09:39:33.800Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>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?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-30T22:45:23.580Z
Answers.Text: 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.
Answers.UserDisplayName: Martin Fuggle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-18T12:40:23.807Z
Answers.LastActivityDate: 2017-03-18T12:40:23.807Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>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:</p>
  
  <pre><code>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-&gt;preProcess()
  #2 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form-&gt;buildForm()
  #3 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display-&gt;perform(Object(CRM_Contribute_Form_ContributionView), "display")
  #4 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Contribute_Form_ContributionView), "display")
  #5 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page-&gt;handle("display")
  #6 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(214): CRM_Core_Controller-&gt;run()
  #7 /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(286): CRM_Contribute_Page_Tab-&gt;view()
  #8 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(310): CRM_Contribute_Page_Tab-&gt;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
  </code></pre>
  
  <blockquote>
    <p>Return to home page.</p>
  </blockquote>
  
  <p>It does not happen on all submissions and I have not been able to diagnose the cause. Has anyone else experienced this issue?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-19T22:15:24.163Z
Comments.Text: I wanted to reformat the error myself but could not see how to do it. Could you let me know what I should do?
Comments.UserDisplayName: Martin Fuggle
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-29T15:33:19.357Z
Comments.Text: 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)
Comments.UserDisplayName: commonpike
Tags: <webform-civicrm>
Title: Webform Error - Expected one PriceSet but found 25
ThreadText: # Webform Error - Expected one PriceSet but found 25
  
  (Asked by: username_0 on 2017-03-18)
  
  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?
  
  **Tags:** webform-civicrm
  
  > **Comments:**
  > **username_0**: I wanted to reformat the error myself but could not see how to do it. Could you let me know what I should do?  
  > **username_1**: 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)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-03-24. Score: 1
  
  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>
  
  > **Comments:**
  > **username_0**: I am using a simple contribution page exactly as described in the documentation.  
  
  ---
  
  ### Answer by username_3 on 2017-03-18. Score: 0
  
  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?
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  