Dear colleagues,
Hello from the Griffith Institute Archive, University of Oxford.
We have encountered an issue with a specific collection record in our catalogue and would appreciate any advice on how to diagnose or resolve it.
The collection in question is:
https://archive.griffith.ox.ac.uk/index.php/clackson-collection
Unlike all other collections in the catalogue, this record does not display correctly. When logged in, it is possible to make some edits, but it is not possible to update the slug, delete the record, or move it to draft status. We have only recently noticed this issue, so unfortunately we do not know how long the record has been displaying in this way.
The collection has many descendant records, which can be viewed here:
https://archive.griffith.ox.ac.uk/index.php/clackson-1
From this page, the full hierarchy is visible. However, it is not possible to navigate back to the parent collection record from the tree view, nor does the collection record itself provide access to the hierarchy.
This is the only collection in the catalogue (out of approximately 170 collections) that behaves in this way.
We have considered creating a new collection and moving all descendant records to it. However, because the current collection cannot be deleted or unpublished, users would ultimately see two collections, which is not an ideal solution.
We are currently running AtoM version 2.10.1 (build 197).
Has anyone encountered a similar issue, or can you suggest how we might investigate and fix this record?
Many thanks in advance.
Best wishes,
Francisco Bosch-Puche
GI Archive Curator
P.S. This is my first time posting to the group, as a former colleague would usually have handled these matters. Please forgive me if I have not followed the usual procedure or if my description of the issue is unclear.
--
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 visit https://groups.google.com/d/msgid/ica-atom-users/1bfc177c-f58e-4054-b65c-668e04aaf96cn%40googlegroups.com.
Hi Francisco,
I think the problem stems from the "Rights" field. Run this query on your database:
SELECT s2.slug FROM relation r INNER JOIN slug s1 ON r.subject_id = s1.object_id INNER JOIN slug s2 ON r.object_id = s2.object_id WHERE s1.slug = 'clackson-collection' AND r.type_id = 168;
It will return a string of numbers and letters, like a1b2-3cc3-ddd8. Delete the "Rights" field associated with the 'clackson-collection' description at: https://archive.griffith.ox.ac.uk/index.php/a1b2-3cc3-ddd8/right/delete If the error lies there, the record will display correctly after deletion.
Greetings!
--
Thank you both, Alberto and Clara, for your quick replies.
I have forwarded them to our IT officer. Let's hope he manages to find a solution based on your suggestions. I will report back.
Thanks again.
Cisco
Hi Richard,
That stack trace is the smoking gun, and it confirms Clara was on exactly the right track, it is the rights statement, and I can now tell you why it probably breaks and why it's only this one record.
First, your direct question: the rights table is not a legacy hangover. It's the standard, current AtoM/PREMIS rights store. Every time someone adds an entry in the "Rights area" of a description or of a digital object, AtoM writes one row here and links it through the relation table with type_id = 168 (QubitTerm::RIGHT_ID). Your single row (id 20090,basis_id 170 = a "policy"/credit-type basis, rights_holder_id NULL) is a perfectly valid rights statement. The reason it's the only one in your catalogue that misbehaves is what your first query revealed: this rights statement is attached to the digital object, not to the description. Note your join — relation r ON r.subject_id = do.id — the relation's subject is digital_object 20084, not information_object 9772. That's the rare case that trips the bug.
Why it 500s. Walk the trace from the bottom up:
- digitalobject/templates/_rights.php:19 renders the rights partial for a digital-object-level right with get_partial('right/right', ['resource' => $item->object, 'object' => $item]).
- right/templates/_right.php:4 then calls QubitAcl::check($relatedObject, 'update').
- But that digital-object caller never passes $relatedObject (the information-object path, right/_relatedRights.php, does, it sets 'relatedObject' => $resource; the digital-object
path doesn't). So $relatedObject is null.
- QubitAcl::check(null,…) → checkAccessByClass(null,…) → switch (get_class($resource)) at QubitAcl.class.php:775 → get_class(null), which is a hard TypeError on PHP 8.
So, this isn't data corruption, a dangling relation, or a broken nested set, your rights row and its relation are intact, and your hierarchy is fine (which is why the descendants and tree render). It's a base-AtoM template that forgets to hand the ACL check its resource, and it only bites when a rights statement lives at the digital-object level. It also explains your exact symptom pattern: viewing/slug-change/delete/draft all render the full record (which renders this partial and crashes), whereas the edit form loads a narrower slice that doesn't hit it.
The fix should be to remove that one digital-object rights statement. The good news: the right module's delete action resolves the related object correctly (it reads it from the relation's subject), so unlike the page view it will not crash. You just can't see the Edit/Delete links because the view dies first, so go to the delete URL directly using the rights record's own slug:
- 1. Find the slug of the rights record (object_id = the rights row id, 20090)
- 1. Find the slug of the rights record (object_id = the rights row id, 20090)
SELECT slug FROM slug WHERE object_id = 20090;
Then (logged in as an administrator) visit:
https://archive.griffith.ox.ac.uk/index.php/<that-slug>/right/delete
Confirm the deletion. That routes through AtoM's own cascade (rights row, its i18n, any granted-rights, and the relation), so it's clean. After it's gone, the clackson-collection page will render normally.
If your team would rather do it in SQL (back up first), identify the full footprint before deleting anything:
-- The rights row, its relation, i18n and any granted rights
SELECT * FROM relation WHERE id = 20091; -- the link (subject=DO 20084, object=rights 20090)
SELECT * FROM rights WHERE id = 20090;
SELECT * FROM rights_i18n WHERE id = 20090;
SELECT * FROM granted_right WHERE rights_id = 20090;
SELECT * FROM slug WHERE object_id = 20090;
I'd strongly prefer the through-the-app delete above to a hand-written SQL cascade, it guarantees nothing is left dangling. Either way, finish with a reindex so search/browse pick up the change:
# per-record is enough here; full populate also fine
sudo -u www-data php symfony search:populate
You do not need the "new collection + move 170 children" workaround, it's a single rights statement.
Hope that gets you sorted.
Regards
Johan Pieterse
The Archive and Heritage Digital Commons Group (Pty) Ltd
To view this discussion visit https://groups.google.com/d/msgid/ica-atom-users/745887cc-a960-40c6-957d-c55b197397een%40googlegroups.com.
Hi Richard
Glad to hear.
I will surely take up your offer.
Groete / Regards
Johan Pieterse
To view this discussion visit https://groups.google.com/d/msgid/ica-atom-users/c6a820fd-add6-4c4b-9731-d42a7dafddddn%40googlegroups.com.