I have created a webform with a single contact and am using it to renew a membership. The process appears to complete successfully however when I look at the contribution in the contact's record I can edit the contribution but if I try to 'view' the contribution I get an error:

Unable to reach the server. Please refresh this page in your browser and try again.

If I try to view the contribution in the webform results I get this 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(531): 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(20): menu_execute_active_handler()
#15 {main}

Updated with backtrace $backTrace = #0

0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(451): CRM_Core_Error::backtrace("backTrace", TRUE)

1 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(55): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))

2 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))

3 internal function: civicrm_invoke("contact", "view", "contribution")

4 /var/www/html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))

5 /var/www/html/index.php(20): menu_execute_active_handler()

6 {main}

  • I suppose you are using webform_civicrm. This drupal module does not support price sets (See the documentation wiki.civicrm.org/confluence/display/CRMDOC/…). When your contribution page does, this is maybe the source of the problem. Jan 23, 2017 at 14:34
  • Yes - I have created a contribution page with the minimal information (the documentation varies from the help displayed online - one says you need to check Contribution Amounts with Label and allow Other Payments, but either way it results in the same outcome). In the database the Contibution record looks OK and in the Line Item table the record looks OK. But when I view the Contribution from the contact record list of contributions I get a "Network Error - Unable to reach the server". I am not sure how I can further diagnose the cause of the error. Jan 23, 2017 at 20:26
  • I can create a membership using a webform when logged on as user1 and also when logged in as user2. When I log out and login as the admin user I can then view the contributions for both user1 and user2. User1 displays the contribution but when I view the contribution for user2 it displays a Network Error - Unable to reach server. What on earth is going on here? Jan 24, 2017 at 0:20
  • Hi Martin, this error has the same cause as civicrm.stackexchange.com/questions/16845/…. So you can apply the same strategy. Jan 25, 2017 at 21:08
  • Hi Kainuk, Thanks so much. I have been bashing my head against a brick wall for a few days now trying every possible configuration combination. Unfortunately I am not a coding expert so I am glad that I am not the only one who has experienced the problem and there is now light at the end of the tunnel! Once again thanks... Jan 26, 2017 at 3:56


Your Answer

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

Browse other questions tagged or ask your own question.