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

Yahoo geocoder returns fatal error/stops payment during contrib & event payments if server is down

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None

      Description

      The Yahoo geocoder stops execution and displays a fatal error if the geocoder can't connect to yahoo for any reason--such as internet connectivity problems or the yahoo web site is down for any reason.

      This creates a serious problem for process contribution, event, or membership payments, because the fatal error causes the contribution processing page to halt with a fatal error. So credit cards are never processed and payments are not completed if this error occurs.

      It is a subtle one to track down, because many payments are processed without a problem (whenever Yahoo is up & running with no problem) but a certain percentage of people trying to make a payment are unable to complete it successfully.

      The solution is pretty simple--just the Pear error handling routine needs to be set to status PEAR_ERROR_RETURN so that the error can be logged etc without stopping execution.

      Here is a possible fix for civicrm-core / CRM / Utils / Geocode / Yahoo.php about line 127:

      require_once 'HTTP/Request.php';
      PEAR::setErrorHandling(PEAR_ERROR_RETURN);
      $request = new HTTP_Request($query);
      $request->sendRequest();
      $string = $request->getResponseBody();

      Here is the link to the documentation for PEAR setErrorHandling():

      http://pear.php.net/manual/en/core.pear.pear.seterrorhandling.php

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bhugh Brent Hugh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified