eileenmcnaughton / nz.co.fuzion.csvimport

Import to API using csv GUI
GNU Affero General Public License v3.0
8 stars 27 forks source link

Problems with importing contributions in PHP8.1 #66

Open TobiasVoigt opened 1 year ago

TobiasVoigt commented 1 year ago

When I try to import contributions in CiviCRM 5.64.4 with csvimport 1.2 in PHP8.1 I get a fatal error. Here's an excerpt from my log:

[25-Sep-2023 11:42:32 Europe/Berlin] PHP Warning: Undefined array key "external_identifier" in /html/wordpress/wp-content/uploads/civicrm/ext/nz.co.fuzion.csvimport/CRM/Csvimport/Import/Parser/Api.php on line 131

[25-Sep-2023 11:42:32 Europe/Berlin] PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /html/wordpress/wp-content/uploads/civicrm/ext/nz.co.fuzion.csvimport/CRM/Csvimport/Import/Parser/Api.php:135

eileenmcnaughton commented 1 year ago

@TobiasVoigt I pushed up a fix that addresses the hard fail. However, I suspect it relates to the notice & in turn the reason you are using this import. I'm not too fussed about fixing Contribution import in this extension though cos I don't think it adds anything that enabling civi-import in core doesn't

TobiasVoigt commented 1 year ago

Thanks Eileen! I didn't know about the civi-import core extension... I'll give that a try! Your extension keeps being an irreplaceable tool for importing more uncommon entities though.

eileenmcnaughton commented 1 year ago

@TobiasVoigt yeah I have been wondering about the use for the uncommon entities. I suspect it might always make sense to have that part in an extension