Unable to Delete Subject - AtoM 2.8.2

71 views
Skip to first unread message

Carolyn Sullivan

unread,
Jul 2, 2025, 2:18:53 PMJul 2
to AtoM Users
We're having a weird issue where we can't delete a subject.  It came up when we were trying to create archival descriptions via a csv and we had one random line that just had 'open' in it.  It created 'open' as a subject, but we can't get rid of it now: 
Untitled design.gif

So far, we've tried rebuilding the nested set, rebuilding the search index, restarting nginx, php7.4-fpm, memcached, and clearing the cache.  I also tried checking the database integrity via sudo -u www-data php symfony tools:data-integrity-repair /home/csulliv4adm/errorchecks_070225.csv ... no errors reported.  Any idea what else to try before I operate on the database?

Thanks,
Carolyn.



C S

unread,
Jul 7, 2025, 1:21:30 PMJul 7
to ica-ato...@googlegroups.com
If, at the very least, someone could please help me isolate where the subjects are held in the database, that would be amazing.  I'm looking at the entity relationship diagrams right now and the probable areas where this might be kept based on the descriptions in documentation (ie. authority records, taxonomies), but I'm drawing a blank.  Any help would be very appreciated.  Thanks!

--
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/ec00fe52-e3bc-4527-9caa-4cf4b532664cn%40googlegroups.com.

Dan Gillean

unread,
Jul 7, 2025, 1:49:29 PMJul 7
to ica-ato...@googlegroups.com
Hi Carolyn, 

Term data will mostly be found in the term and term_i18n tables. Some values  of a term might be in the note and note_i18n tables as well. There is also the object_term_relation table used to connect IDs across entities. Some initial queries to get you started can be found here: 
You can also try looking in older forum posts for helpful hints. Here are older threads that had the "access-points", "taxonomies" and "SQL" labels: 
It looks like you can see a slug for the term (open-1). I don't have an AtoM environment anymore to test out the joins, but I think you should be able to join to the slug table, and use that slug to select the record, and find its ID? Or you can use the taxonomy ID (35 is subjects I believe) and just browse all the terms until you find it: 
When you do find the problem entity, be sure to delete it from the root object table, so the deletion will cascade to other relevant tables - e.g. 
  • DELETE FROM object WHERE id='xxxxx';

Dan Gillean, MAS, MLIS
Business & User Experience Analyst
Artefactual Systems, Inc.
604-527-2056
he / him


C S

unread,
Jul 9, 2025, 4:48:30 PMJul 9
to ica-ato...@googlegroups.com
Thanks, Dan, this was exactly how to do it... literally all I had to do was find the slug to get the object_id (ie. SELECT * FROM slug WHERE slug="open-1";) and then use the object_id to delete the equivalent id from the object table (DELETE FROM object WHERE id=830824; in this case).  Really appreciate your help!  Have a wonderful rest of your week!

Reply all
Reply to author
Forward
0 new messages