Bug #10085

CSV import: digital object URLs cannot be imported, produce a "could not resolve host" message in the console

Added by Dan Gillean about 4 years ago. Updated over 3 years ago.

Status:VerifiedStart date:06/28/2016
Priority:MediumDue date:
Assignee:Sara Allain% Done:

0%

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

Description

Using the latest 2.4.x code, try importing the attached CSV (isad_0000000001.csv). It includes 3 top-level descriptions, each with with external digitalObjectURI values. I have tested that the URIs can all be resolved in a browser. Importing an XML version of these files (which include the same digital objects as <dao> elements) also works.

On import, the digital objects are skipped, with the following warning printed in the console:

vagrant$ php symfony csv:import --index /vagrant/isad_0000000001.csv
WARNING: If you're importing multiple CSV files as part of the same import it's advisable to use the source-name CLI option to specify a source name (otherwise the filename will be used as a source name).
Could not resolve host:
.Could not resolve host:
.Could not resolve host:
.>> propel    Build nested set for information_object...
>> propel    Build nested set for actor...
>> propel    Build nested set for term...
>> propel    Done!
[~/atom] (qa/2.4.x)

2 things of note here. First is that this is a blocking issue for #9995, and seems to result from work done on this ticket.

Specifically, it relates to the following commit: https://github.com/artefactual/atom/commit/5637a5bfa027f32561e7b6b8c08aca0080aaf645

Mike Gale will provide a bit more technical follow-up on what he found when checking this out.

Second, the error message is pretty useless. It would be better if it actually provided the URI that could not be resolved( e.g. "Could not resolve host: http://www.example.com/my-image.jpg"), or said something like "Could not resolve external URI for information object [information object legacyID from CSV]"

isad_0000000001.csv Magnifier (7.12 KB) Dan Gillean, 06/28/2016 06:51 PM


Related issues

Blocks Access to Memory (AtoM) - Feature #9995: Enhance import matching behaviors: add a digital object c... Verified 06/10/2016

History

#1 Updated by Dan Gillean about 4 years ago

  • Blocks Feature #9995: Enhance import matching behaviors: add a digital object checksum column to CSV import/export templates and use it on import for first match when importing updates added

#3 Updated by Mike Gale about 4 years ago

I did a `git bisect` and it pointed to the commit Dan mentions. I'm not entirely sure why this error is getting triggered, but I think it's possibly coming from the curl library.

You might want to do additional logging to tell for sure it's here, but I suspect the error is trickling up here: https://github.com/artefactual/atom/blob/qa/2.4.x/lib/task/import/csvImportTask.class.php#L1032-L1041
From here: https://github.com/artefactual/atom/blob/qa/2.4.x/lib/model/QubitDigitalObject.php#L1393

Again, this is just my several minute investigation / suspicions based on working in that code before, I could be off base.

#4 Updated by Steve Breker about 4 years ago

  • Status changed from New to Code Review

Completed implementing change to resolve issue. PR completed for code review.

#5 Updated by Steve Breker about 4 years ago

  • Status changed from Code Review to QA/Review

Code Review complete. Merged to qa/2.4.x. Moving to QA/Review.

#6 Updated by Steve Breker about 4 years ago

  • Assignee changed from Steve Breker to Dan Gillean

#7 Updated by Sara Allain almost 4 years ago

  • Assignee changed from Dan Gillean to Sara Allain

This worked when importing the CSV file through the command line. Ongoing issues with #9774 prevent testing through the UI for the time being.

#9 Updated by Sara Allain over 3 years ago

  • Status changed from QA/Review to Verified

Confirmed to work in the UI as well.

Also available in: Atom PDF