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
Comment #2
larowlanWhat 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.
Comment #3
aaronbaumanThis 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.
Comment #4
andypostI think kind of
--allow-failuresfor drush import may work hereAlso it can be useful for issues when deafult content already imported or partially deleted (mean a dev time)
Comment #5
berdirDuplicate of #3057880: Handle exceptions during import