collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
295 stars 167 forks source link

Bulk EAD/XML import giving errors with related list items #1505

Closed Monica-Wood closed 1 year ago

Monica-Wood commented 1 year ago

I updated to the newest code base a couple of days ago and this error has started happening when I bulk import EAD/XML data from a directory. Works fine if I pass it individual files. Happening both develop and dev/php8

I have a relationship mapped to ca_collections_x_vocabulary_terms, i

This is the error is gives if running PHP7.4 Could not add related list item with relationship described: Invalid relationship reference for item_id

and running PHP8.1 Error while processing related content: Cannot add or update a child row: a foreign key constraint fails (ca.ca_collections_x_vocabulary_terms, CONSTRAINTfk_ca_collections_x_vocabulary_terms_item_idFOREIGN KEY (item_id) REFERENCESca_list_items(item_id) ON DELETE RESTRICT ON U)

I'm about to try it on older code base.

Monica-Wood commented 1 year ago

Discovered this was when in Dry Run mode and the relationship was repeated in the XML (quality of this data isn't very good). I'm sure I wasn't getting these errors last week, so maybe something about logging as become more verbose? Closing