Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12997

Manually completing event contribution fails for multiple line items

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.4
    • Fix Version/s: 4.3.5
    • Component/s: None
    • Labels:
      None

      Description

      Manually completing an event registration @ civicrm/contact/view/contribution?reset=1&action=update&id=AAA&cid=BBB can fail when the contribution has multiple line items.

      https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/BAO/Contribution.php#L2735 expects each line item to have an 'id' value, but https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Contribution.php#L1046 only sets the 'id' value on the first entry in the lineItems array.

      Example $lineItems array - https://gist.github.com/xurizaemon/c4ddfd08db714613c527

      The outcome is that completing an event registration (contribution?) manually from the UI results in the user seeing,

      Sorry but we are not able to provide this at the moment.
      One of parameters (value: ) is not of the type Integer

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: