1

After upgrading from CiviCRM 4.6.24 to CiviCRM 4.7.18 on Drupal (7.52) we are getting the error "Expected one Contribution but found 25" whenever registering for an event with an event page.

I have tested logged in, not logged in, with and without price sets.

The transactions receiving this error are being created in CiviCRM and not using an API call like with Webform.

I am running Apache 2.4.25 with PHP 5.6.30.

The error details that I have in Drupal Watchdog is too long to post.

4
  • Might be worth looking at CRM-20297 and CRM-20383 - not confident these are related, but they may be. Commented May 2, 2017 at 0:06
  • @ChrisBurgess I looked at both of those and they appear to only be related to transactions that are made with tools outside of CiviCRM. These are the core CiviCRM pages which I see now do use the API.
    – Josh
    Commented May 2, 2017 at 0:37
  • @ChrisBurgess I applied these patches and unfortunately they did not solve the problem.
    – Josh
    Commented May 4, 2017 at 1:15
  • I have posted this on the issues.civicrm.org as I think this is a bug. issues.civicrm.org/jira/browse/CRM-20523?filter=-2
    – Josh
    Commented May 4, 2017 at 22:03

2 Answers 2

1

It does look like the API is called in the background anyway. That would make sense as it is the preferred way to communicate with the database. It does look like the API action 'getsingle' is used and it is receiving more than one. Can you explain a little more on which point you are getting the error?

10
  • The error comes when confirming the submission of a payment using the CiviCRM event pages. Thanks!
    – Josh
    Commented Apr 30, 2017 at 17:19
  • On some of my tests I am seeing Notice: Undefined index: trxn_id in CRM_Event_Form_Registration_Confirm::processContribution() (line 985 of /home/site/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php). right before the fatal error.
    – Josh
    Commented Apr 30, 2017 at 17:20
  • That might be the cause of the problem? I can not say from a distance :-) Commented Apr 30, 2017 at 17:27
  • how would I go about figuring out how that happening? This was all working great in 4.6 and I do not have any extensions acting on these pages. To Veriffy this I turned off all the extensions and still get the error. :(
    – Josh
    Commented Apr 30, 2017 at 20:08
  • I think I found the problem the Completed status appears to be missing. For example, when creating a contribution in the back end as part of an event registration I see this - s3-us-west-2.amazonaws.com/onlinesharing18/… . None of the new transactions that have gone through have a completed status (s3-us-west-2.amazonaws.com/onlinesharing18/…). If I look at the contribution_status options it is there and endabled.
    – Josh
    Commented May 1, 2017 at 0:46
1

I am not sure how this happened but Partially paid and Pending refund where added with the values of 1 and 2 respectfully. These were duplicating the completed statuses like you can see in this image.

[enter image description here

I have also updated the JIRA ticket https://issues.civicrm.org/jira/browse/CRM-20523.

2
  • These are the queries I used to fix this. mysql> UPDATE civicrm_option_value SET is_active ='1' WHERE id='1' and option_group_id='11'; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> UPDATE civicrm_option_value SET is_active ='1' WHERE value='1' and option_group_id='11'; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0
    – Josh
    Commented May 14, 2017 at 21:51
  • Interesting .. where are you seeing the screenshot you took ?
    – commonpike
    Commented Aug 3, 2017 at 9:57

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.