Receiving following error in drupal when importing contribution from a csv. Is there a quick fix for this?

Error: Class name must be a valid object or a string in CRM_Import_Parser->parsePseudoConstantField() (line 565 of /home/webadmin/public_html/cmm/sites/all/modules/civicrm/CRM/Import/Parser.php).

Notice: Undefined index: bao in CRM_Import_Parser->parsePseudoConstantField() (line 563 of /home/webadmin/public_html/cmm/sites/all/modules/civicrm/CRM/Import/Parser.php).

These are the fields I am trying to import

  • ContactID

  • Total Amount

  • Financial Types

  • 1 Custom field (I have imported this custom fields previously)

  • Eligible for giftaid (giftaid extension) (I have imported this previously)

  • Received Date

  • Contribution Source

  • It might help if you can post: * The full error from the CiviCRM logs from the time of the error * A sample of the file with the column headers (personal data removed if needed) For the CiviCRM logs usually you can look on your server in site/default/files/civicrm/ConfigAndLog (replace with wherever the Drupal files folder for your site is stored if different)
    – lolcode
    Oct 7, 2019 at 20:11

1 Answer 1


This patch fixed the problem. Thanks to @skherraz


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.