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

Fatal parser error on CSV import

    Details

    • Type: Patch
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.5
    • Fix Version/s: 4.2.0
    • Component/s: Core CiviCRM
    • Labels:

      Description

      Import with a CiviCRM 4.1.15 on Wordpress 3.4.1 failed with an error like:

      Fatal error: Call to undefined method Services_JSON::encodeUnsafe() in /home/marin/public_html/administrator/components/com_civicrm/civicrm/CRM/Import/Parser.php on line 336

      Xavier showed a pworkaround in http://forum.civicrm.org/index.php/topic,20325.0.html which fixed it for me by changing the Parser.php like this:

      1) removing all the

      • require_once 'Services/JSON.php';
      • $json = new Services_JSON();
        2)
        replacing $json->encodeUnsafe by json_encode

      Xavier also attached a patchfile:

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              corcken Corcken Bomas
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: