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

Error message needs updating for certain error on contribution page submission, with suggested solution

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.1
    • Fix Version/s: 4.2.3
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      When users submit a contribution, and some server or browser error causes the POST variables to be lost,
      CiviCRM gives this error:

      "This contribution has already been submitted. Click here if you want to make another contribution."

      We were receiving this error when the server was overloaded and gave an error "Unable to Start Another Process, trying again in 10 seconds". After 10 seconds it would automatically re-load the page, but without the POST variables. This error would result.

      The problem is that it gives users the impression that their credit card data has been submitted for payment ("this contribution has already been submitted") when in fact it has not.

      I would suggest simply changing the wording of the error message:

      "An error occurred during form submission. This page requires form data to be submitted for processing and no form data was submitted or processed. Click <a href=\'%1\'>here</a> to visit the contribution page and re-start the contribution process."

      The code is about line 203 of CRM/Contribute/Form/ContributionBase.php, which currently reads:

      CRM_Core_Error::fatal(ts('This contribution has already been submitted. Click <a href=\'%1\'>here</a> if you want to make another contribution.', array(1 => CRM_Utils_System::url('civicrm/contribute/transact', 'reset=1&id=' . $pastContributionID))));

      The error is triggered when the contribution page ID is not received by the form submission but 'pastContributionID' does exist as a session variable--indicating that the user has visited the form page previously but the form data was not submitted with this page submission.

      As far as I can figure out this could only happen in these circumstances:

      • As described above, the user visited the contribution page, submitted the form properly, but some browser or server error stopped the form data from being submitted. (Tested--this definitely happens)
      • A user visited a contribution page, perhaps submitting the page properly and making a contribution, but also perhaps stopping the contribution process at some intermediate step, and then later tried to visit /civicrm/contribute/transact for some random reason. (Tested--this definitely happens.)
      • Possibly, the user uses the 'back button' or browser history list to try to go back to an intermediate page in the contribution process (I haven't tested this possibly directly, but it is similar to the problem above).

      If a user submits a contribution successfully and then hits 'reload' on the landing page, a different error message is triggered, so I don't think this error message needs to consider that possibility.

      I think the suggested change the error message makes sense in all of those circumstances.

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              bhugh Brent Hugh
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: