1

we've been using CiviCRM for several years and we've just recently version 4.7 to 5.8.2, but now we can't use the Batch Data Entry any more. We can create new batches, add entries and save them, but when I press Validate and Process the batch it just displays the batch again.

I guessed that it might be a validation problem and eventually put a log statement to get any errors on form validation. In my test batch there are two entries and this is the error I get:

Form Errors: Array
(
  [field[1][payment_instrument]] => Payment Method is a required field.
  [field[2][payment_instrument]] => Payment Method is a required field.
)

Nothing is displayed on the screen because there isn't a Payment Method--or Payment Instrument--field in the form, so that explains what is going wrong, but not why.

Looking at the DB for past batches, we've never had to specify the Payment Method before, I notice that there is a payment_instrument_id field on civicrm_batch, but it's optional and null for all our past batches.

How can I make it optional so I don't need to add a field to the form?

Thanks!

  • So, I've found that if I go in to Administer -> Custom Data and Screens -> Profiles, then choose Reserved Profiles and add a Payment Method ID field to the fields for Contribution Bulk Entry, and then make sure I set the field value to 4 for example, then the batch is processed successfully. But this isn't much good for my non-techy administrators. Is there at least a way to make this a drop down? – DenisH Feb 7 at 13:41
  • I spoke too soon :-( I've now got it working on my local test version and I can remove Payment Method ID field and it still processes the batches (I tried several). But if I go to the live system and try the same steps there, it doesn't process the batch. No error message, just returns to the same batch entry page again. I wonder if there's something cached and I accidentally cleared it on the test system? I've tried &directoryCleanup=3 but that didn't make any difference. – DenisH Feb 7 at 15:23
  • I found a work around: In the file civicrm/civicrm/CRM/Batch/Form/Entry.php, in the static function formRule(), I commented out this line: // 'payment_instrument' => ts('Payment Method'), and that does the trick. I can't see any other way to fix it. Can anyone else tell me a better way? – DenisH 2 days ago
0

We had one client inform us that they could not save Batch Data - everything we tried to replicate the issue failed. In the end we concluded that it was due to browser caching which the client was able to confirm by testing with a different browser.

Refreshing the chrome caching (https://support.google.com/accounts/answer/32050?co=GENIE.Platform%3DDesktop&hl=en) sorted it for them.

May not relate to your situation at all.

  • Thanks for the suggestion, I'm pretty sure it's to do with the form not being valid though rather than a browser issue – DenisH Feb 7 at 13:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.