‘An object cannot be a descendant of itself' when updating via csv

33 views
Skip to first unread message

Jacob Bickford

unread,
Jul 19, 2021, 11:41:18 AM7/19/21
to AtoM Users
Hi all,

Here at the University of Westminster we are currently testing an upgrade to version 2.5.4. 

We do a lot of editing and updating via csv: typically we export an existing set of records (e.g. a series), make some edits in the csv and then reupload it with ‘Update matches ignoring blank fields in CSV’ and ensure ‘Skip unmatched records’ selected. However in the new version we are sometimes getting the error message 'An object cannot be a descendant of itself'. We haven't had this issue with our current version (2.4.1).

The fields we are editing would be ones like scopeAndContent or accessConditions not things like the legacyId or parentId which I could understand might generate an error like this. I also can't seen any obvious difference between those imports that work and those that don't. Below is an example of one of the error messages.

We were just wondering if other members of the community had experienced this problem and if this is resolved in later versions?

Many thanks,

Jacob

Jacob Bickford

Archive and Records Officer

 University Records and Archives

University of Westminster
4-12 Little Titchfield Street
London W1W 7BY
Tel: +44 (0)20 7911 5167
www.westminster.ac.uk/archives

[info] [2021-07-06 07:51:14] Job 497058 "arFileImportJob": Job started.
[info] [2021-07-06 07:51:14] Job 497058 "arFileImportJob": Importing CSV file: DAV_13.csv.
[info] [2021-07-06 07:51:14] Job 497058 "arFileImportJob": Indexing imported records.
[info] [2021-07-06 07:51:14] Job 497058 "arFileImportJob": Skipping unmatched records.
[info] [2021-07-06 07:51:14] Job 497058 "arFileImportJob": Update type: match-and-update
[info] [2021-07-06 07:52:11] Job 497058 "arFileImportJob": php '/usr/share/nginx/atom/symfony' 'csv:import' --index --update="match-and-update" --skip-unmatched --quiet --user-id="216758" --source-name='DAV_13.csv' '/usr/share/nginx/atom/uploads/tmp/TMP8d79e754.csv'; Row 1: Matching description found, updating in place; row (id: 424672, culture: en, legacyId: 424062)...; Row 2: Matching description found, updating in place; row (id: 424672, culture: en, legacyId: 424564)...; An object cannot be a descendant of itself.
[info] [2021-07-06 07:52:11] Job 497058 "arFileImportJob": Job finished.

Dan Gillean

unread,
Jul 23, 2021, 4:20:12 PM7/23/21
to ICA-AtoM Users
Hi Jacob, 

I've consulted briefly with one of our developers, who has pointed out the following: 

AtoM uses a Nested set model as a way of organizing and optimizing hierarchical data in the flat, table-like structure of a relational database. We typically see this kind of error when the child record's nested set lft and rgt values are outside of the parent's values for these same elements. The first thing we'd recommend trying is rebuilding the nested set, as well as clearing the application cache to see if this helps to resolve the issue. 

All of the following commands should be run from the root AtoM installation directory - if you have followed our recommended installation instructions, then this is typically: 

  • /usr/share/nginx/atom

If the commands won't run and you've confirmed you are in the right directory, try running them as the www-data user - this is the user to whom we assign all filesystem rights when installing and configuring AtoM. To do so, simply precede the commands below with sudo -u www-data.


Rebuild the nested set
Clear the application cache
Restart PHP-FPM
If the problem persists, I might next suggest taking a close look at the CSV you are trying to import. One thing I noticed in the job output and error message you shared is that rows 1 and 2 are both attempting to update the same record ID (424672), which might suggest a problem. 

Let us know how it goes! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


This message and its attachments are private and confidential. If you have received this message in error, please notify the sender and remove it and its attachments from your system.

The University of Westminster is a charity and a company limited by guarantee. Registration number: 977818 England. Registered Office: 309 Regent Street, London W1B 2UW.

--
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 on the web visit https://groups.google.com/d/msgid/ica-atom-users/f87004de-49c8-4bdc-9f27-97d15d6bd80bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages