CSV Import gets 500 internal server error

562 views
Skip to first unread message

John Coquitlam

unread,
Jan 31, 2022, 11:27:26 AM1/31/22
to AtoM Users
Hi,
We keep getting the 500 internal Server error when we try to do a CSV import.
We have tried some of the suggestions found in this forum such and checking delimiters and doing
sudo php symfony cc
sudo php symfony search:populate
But still we get the 500 error.
Our version is 2.4 and in the apache error log we found the following

[Fri Jan 28 14:20:56.238303 2022] [:error] [pid 6196] [client 142.219.78.28:62898] PHP Fatal error:  Call to a member function __get() on a non-object in
/var/www/atom/lib/model/om/BaseObject.php on line 556, referer: http://searcharchives.coquitlam.ca/index.php/city-of-coquitlam-and-regional-publications-a
nd-photographic-slides/object/importSelect?type=csv

I have attached the CSV file.
Any suggestions will be much appreciated.

Thanks,
John
uploadfile.CSV

Dan Gillean

unread,
Jan 31, 2022, 11:34:32 AM1/31/22
to ICA-AtoM Users
Hi John, 

Unless you have a description in your system that has a slug of series, and you are trying to attach the incoming descriptions as child records of this series target, then I think there's a column error in your CSV: 

csv-error.png

Hopefully, changing that to levelOfDescription will resolve the issue. The qubitParentSlug column is typically used to pass the slug of an existing description, so imported records will be added as children. See: 
Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/e72fd7fe-8ead-404c-a9ff-98c62fa20ccfn%40googlegroups.com.

John Coquitlam

unread,
Jan 31, 2022, 12:37:42 PM1/31/22
to AtoM Users
Hi Dan,
We have updated that column with the proper value but we are still getting the 500 internal server error.
I have attached the updated upload file.
Thanks,
John
uploadfile2.CSV

Dan Gillean

unread,
Jan 31, 2022, 1:16:38 PM1/31/22
to ica-ato...@googlegroups.com
Hi John, 

I haven't tested yet to try and reproduce this and confirm my theory, but looking at the error message again, I may have identified a possible issue. 

Are you trying to import this CSV from the "Import CSV" link on the related target series parent's view page? Rather than using the global Import CSV option available in the main menu to administrators?

I confess it's been a while since I've used the description view page import link, but my theory is that when this is used, AtoM automatically sets the target parent as the description shown on the view page, and will import the contents of the CSV as children. However, by setting the qubitParentSlug, it's now looking for a descendant under series-21 with that slug, rather searching globally for a description using that slug - hence the error. 

If my guess about your workflow is correct, I'd recommend trying your import from the global Import menu instead. The qubitParentSlug column value will still find the right parent and attach the CSV records as children during import. Hopefully this will also bypass the error. 

The other possible workflow - which I'm less sure about - would be to import it from the series-21 description view page, but do NOT set the qubitParentSlug value in the CSV, since the location of the import is already determining parentage. 

Either way, I strongly recommend making a backup before you import again, so you can easily roll back if something goes wrong. 

If my suggestion doesn't resolve the issue, then I'll try to reproduce the error locally, so we can determine if there's something else in the CSV causing the issue - or if it's particular to your installation. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

John Coquitlam

unread,
Jan 31, 2022, 1:56:31 PM1/31/22
to AtoM Users
Hi Dan,
You are right.
We use the global import and it worked.
Thank you so much!
John
Reply all
Reply to author
Forward
Message has been deleted
0 new messages