Reproduce:
* export some nodes, with dependencies on files (using drush dcer)
* put the generated content into a module
* delete one file from the source site
* enable the new module on a different site

Expected behavior:
* file which was deleted gets created, but has a broken href

Observed behavior:
* when default content tries to import the file, an uncaught exception halts further processing of content import

Proposed resolution:
* catch exceptions when importing content; do not break an import completely just because one content item fails

Comments

aaronbauman created an issue. See original summary.

larowlan’s picture

What is the exception you get?

You may find using file_entity module or better_normalizers here lets you export the files as base64 and then the file need not be present.

aGov is using the latter as we didn't want the file_entity dependency.

aaronbauman’s picture

This particular case was because the referenced image file was 404'd, but I also hit exceptions for a missing author dependency or a missing input filter.

I can't think of a scenario in which I want a single exception to sink the whole import.

andypost’s picture

I think kind of --allow-failures for drush import may work here
Also it can be useful for issues when deafult content already imported or partially deleted (mean a dev time)

berdir’s picture

Status: Active » Closed (duplicate)