NEU-Libraries / cerberus

Digital Repository Service
8 stars 0 forks source link

Error when trying to associate two files #1088

Closed sarahjeansweeney closed 7 years ago

sarahjeansweeney commented 7 years ago

I just encountered an error while trying to associate a video to its transcript file:

There was an error processing your request. The error received was "undefined method `each' for nil:NilClass". Please try again or contact DRS Staff for help.

2017-03-21_1623

I entered the transcript's URL in the "Associate files" box on the Associate tab and selected "Is Transcription Of" from the dropdown box. Clicking "Associate" triggered the error.

I tried again using the supplemental association and did not encounter an error. The file was associated, and both the supplemental and transcription associations display:

2017-03-21_1628

So it seems it was successful, just not sure why I got the error.

elizoller commented 7 years ago

It might require a hard refresh. If that doesn't resolve it, I'll take a deeper look first thing tomorrow

sarahjeansweeney commented 7 years ago

I still encountered the error after a hard refresh.

elizoller commented 7 years ago

Ah. Making some headway to debugging this issue. This transcript was related to a file which got tombstoned but the tombstoned file pid is still in the rels-ext and the solr doc, which is what is causing this error. If we remove the associated relationships when a file is tombstoned then if the file is revived, they will not have the relationships anymore. The other option would be to leave the pid in place but do some kind of filtering out tombstoned (or deleted items). We maintain the parent relationship for a tombstoned file so it can be placed back in its correct place if it is revived.

dgcliff commented 7 years ago

I think removing the association on tombstoning makes sense

elizoller commented 7 years ago

That is what I was thinking also. I'll work on a patch.