<div dir="ltr"><div>Hello,</div><div><br></div>Our archives encountered a bug while merging Top Containers in version 2.8.1 of Archives Space that causes any linked Accession records to become inaccessible via the SUI (500 error). We still haven't found a way to restore these records. <div><br></div><div> After merging a Top Container that had 4 linked Accession records into a new Top Container with no linked records, we can no longer view or edit these 4 linked records and they were not linked to the new Top Container. I also tried the same steps on the Sandbox and got the same results. Here's what the broken record looks like in the sandbox: <a href="http://sandbox.archivesspace.org/accessions/3">http://sandbox.archivesspace.org/accessions/3</a>.<div></div><div><br></div><div>This is the start of the Backend error we get when trying to view these 4 records:<div><br></div><div>    undefined method `gsub' for [SubContainer, TopContainer]:Array</div><div>    uri:classloader:/jsonmodel.rb:105:in `parse_reference'<br></div><div><br></div><div>I pulled the JSON objects for these 4 records with the API to see what was happening with the data. The 'ref' value for instances.sub_containers.top_container should have a uri, but instead has an array. </div><div><br></div><div>What is expected:</div><div>    "ref": "/repositories/3/top_containers/2861"</div><div><br></div><div>What we have:</div><div>    "ref": [</div>                        "SubContainer",<br>                        "TopContainer"<br>                    ]</div><div><br></div><div>I tried replacing the 'ref' value with the correct uri string and posting the updated JSON object, but I'm getting an error: undefined method `id' for nil:NilClass</div><div><br></div><div>If anyone has any advice on the bug or how to fix the records I'd love to get some feedback.</div><div><br></div><div>Best,</div><div>Joshua<br><div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:arial;font-size:10px;padding:5px 0px 0px 5px;margin:0px"><span style="color:rgb(232,46,33);font-weight:bold">JOSHUA DULL</span><br><b>ASSISTANT DIRECTOR OF LIBRARY SYSTEMS</b><br><span style="color:rgb(232,46,33)">THE NEW SCHOOL</span><br><span style="color:rgb(102,102,102)">LIBRARIES & ARCHIVES</span></p></div></div></div></div></div></div></div></div></div>