I am getting an error when I import contributions.
I have successfully imported contributions before from other data sets. This dataset is a little more rich and I have now added a 3 custom fields to contain the messaging options that the user can complete. The initial mapping and basic checks pass. However at the step of the actual import, every record fails with the error "Expected one Contribution but found 25"
I have reviewed the mapping and can't see any obvious issues. I have searched stackexchange and the web with no result that seems to relate to my situation.
I would love to hear any ideas. I don't see any records in the CiviCRM log, though maybe there is some further switch I should be enabling to get more information.
In response to a comment, I enabled debugging and backtrace. I ran a test import, but no errors of any kind were thrown into the CiviCRM log in the ConfigAndLog directory. It does log other errors there, so I can only assume that it doesn't see this as an error of that kind. I continue to receive the "Expect one ... found 25" error in the front end output.
The problem occurs as I say in my "Answer" below when I try to use one of the existing fields to set "Contribution status". I assume and accept that the data is probably incorrect for the column in the db (though I can't find it), but the resulting error makes no sense. I'm fine with that but thought I'd share back into this space since asked and it might be helpful in clarifying the error that is thrown.
I am running 5.19.3 on WordPress 5.3
getsingle
call. This error happens most often when a value is missing - e.g. "find me the contribution with an ID ofx
" normally returns one contact - but ifx
is blank, it will return ALL contributions. Since the API normally limits to 25, you get this error.