Bug #11051

MODS import not working in 2.4

Added by Tim Hutchinson over 3 years ago. Updated about 3 years ago.

Status:VerifiedStart date:04/11/2017
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:XML import / export
Target version:Release 2.4.0
Google Code Legacy ID: Tested version:2.4
Sponsored:No Requires documentation:

Description

Both via job scheduler and CLI, a MODS import raises this error in 2.4:
PHP Fatal error: Call to undefined method sfModsConvertor::objectTermRelationExists() in /usr/share/nginx/atom/lib/QubitFlatfileImport.class.php on line 2031

The same file imports via both CLI and the user interface in stable/2.3.x

isad-mods-crosswalk;mods.xml Magnifier (3.67 KB) Dan Gillean, 04/11/2017 03:05 PM


Related issues

Related to Access to Memory (AtoM) - Bug #11052: MODS import missing actor/info object relationship Feedback 04/11/2017

History

#1 Updated by Dan Gillean over 3 years ago

  • Category set to XML import / export

Hey Tim,

Did you remember to select "MODS" from the drop-down for the import type on the XML import page?

I will try this again, but yesterday, in looking over that user forum thread to which you have recently replied, I did successfully import a MODS file. It throws a bunch of warnings (as does 2.3), but ultimately works. I will test again later.

#2 Updated by Tim Hutchinson over 3 years ago

Hi Dan - yes, I chose the pull down. But if you're getting it to work, this might also be related to a caching problem with the MODS (which had come up during the original development as well). I thought I was getting a different error but I'll test that angle further.

#3 Updated by Tim Hutchinson over 3 years ago

Dan, I will test further and file this separately necessary, but in your testing are you getting the authority records to link correctly to the descriptions? In the files I imported in 2.3, the authority records are imported, but they're not linked.

#4 Updated by Dan Gillean over 3 years ago

Oh! I already shut down my 2.3 VM and have started firing up the 2.4 one :(

You will see in my post in the user forum that the creator name and the dates did not come in with the MODS import in 2.3 - but I didn't think in my haste to check if the authorities were created separately.

Please do feel free to file an issue for this!

#5 Updated by Tim Hutchinson over 3 years ago

Even after fixing the caching problem (see https://projects.artefactual.com/issues/7289#note-21), I'm still getting this error. I'm just testing with CLI right now since there's a job stuck in the queue. Do you have instructions handy for how to clear the queue or kill a particular job?

This is with a fresh install via vagrant.

#6 Updated by Dan Gillean over 3 years ago

I don't - I tend to just restart the worker if there are problems and that usually resolves things for me. I've asked our devs, but a lot of folks are out of office or sick at the moment.

#7 Updated by Dan Gillean over 3 years ago

Also, FWIW, my brief attempt was an import via the UI. I will try to do more testing myself, but I am also pretty sick right now, and might have to lay down for a bit.

#8 Updated by Dan Gillean over 3 years ago

Hi again,

Apparently there is not currently a task that will kill a specific job, but you can clear all queued jobs with the following command:

php symfony jobs:clear

#9 Updated by Tim Hutchinson over 3 years ago

Thanks Dan, sorry to hear you're sick. Definitely not a rush on this - I was just following up on the user forum thread and it sidetracked me more than I expected.

#10 Updated by Dan Gillean over 3 years ago

Ok....

so: I got the same error as you did trying to import via CLI.

though I somehow was successful yesterday running an import via the UI, right now when I tried with the attached record (also shared in the related user forum thread ) via the UI, the job has just run indefinitely, seemingly caught in a strange loop, according to the job details:

[info] [2017-04-11 12:01:36] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:01:36] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:01:36] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:01:36] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:01:40] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:01:40] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:01:40] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:01:40] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:01:44] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:01:44] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:01:44] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:01:44] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:01:48] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:01:48] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:01:48] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:01:48] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:01:52] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:01:52] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:01:52] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:01:52] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:01:56] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:01:56] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:01:56] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:01:56] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:02:00] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:02:00] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:02:00] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:02:00] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:02:04] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:02:04] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:02:04] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:02:04] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:02:08] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:02:08] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:02:08] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:02:08] Job 2001522 "arFileImportJob": Update type: import-as-new
[info] [2017-04-11 12:02:12] Job 2001522 "arFileImportJob": Job started.
[info] [2017-04-11 12:02:12] Job 2001522 "arFileImportJob": Importing XML file: isad-mods-crosswalk;mods.xml.
[info] [2017-04-11 12:02:12] Job 2001522 "arFileImportJob": Indexing imported records.
[info] [2017-04-11 12:02:12] Job 2001522 "arFileImportJob": Update type: import-as-new
...

In the end, I had to use the jobs:clear task myself - so it looks like we are seeing the same behavior?

#11 Updated by Tim Hutchinson over 3 years ago

Yes, I was seeing something similar in the job details. Glad it's not just me :)

#12 Updated by Tim Hutchinson over 3 years ago

Also, I got the undefined method error following a UI import, but the output was in the terminal. This may have to do with the way I'm running the job scheduler - the most simplistic method provided in the docs (I guess errors aren't being logged in the background). I was seeing the error again every time I ran php symfony jobs:worker (the queue seems to have cleared without running that command, but that might only be because I restarted the vagrant box in the meantime)

#13 Updated by Dan Gillean over 3 years ago

  • Related to Bug #11052: MODS import missing actor/info object relationship added

#14 Updated by Mike Cantelon over 3 years ago

  • Status changed from New to Code Review
  • Assignee set to Nick Wilkinson

I think I've fixed the issue (in CLI and web UI).

PR for CR: https://github.com/artefactual/atom/pull/551

#15 Updated by Mike Cantelon over 3 years ago

(I'm also putting changes, in the above PR, related to #11051 as I can't fix #11051 without MODS being able to work so may as well to it all in one branch.)

#16 Updated by Nick Wilkinson over 3 years ago

  • Assignee changed from Nick Wilkinson to José Raddaoui Marín

#17 Updated by José Raddaoui Marín over 3 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to Mike Cantelon

Looks good!

#18 Updated by Mike Cantelon over 3 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Cantelon to Dan Gillean

Merged into qa/2.4.x.

#19 Updated by Tim Hutchinson over 3 years ago

Working for me now; tested both UI and CLI

#20 Updated by Dan Gillean about 3 years ago

  • Status changed from QA/Review to Verified
  • Assignee deleted (Dan Gillean)
  • Target version set to Release 2.4.0

Also available in: Atom PDF