Dump/Export trimming file name while importing

Enonic version: 7.7.2
OS: Ubuntu 20.04

I noticed an error while importing a dump file and I managed to reproduce the error by importing from a single content export, so the error is happening while importing a dump or an export file.

The error message for dump/export:

Errors: [
"Error processing binary, skip - com.enonic.xp.export.ImportNodeException: Missing binary source, expected at: /enonic-xp/home/data/export/as-en-2021-09-22/en/norgesferie/Northern-Lights-at-Tromso-Norway-lightscape-unsplash.jpg/_/bin/Northern Lights at Tromso, Norway - lightscape-unsplash.jpg",
"Could not import node in folder [/enonic-xp/home/data/export/as-en-2021-09-22/en/norgesferie/Northern-Lights-at-Tromso-Norway-lightscape-unsplash.jpg]: No binary with reference binary: Northern Lights at Tromso, Norway - lightscape-unsplash.jpg attached in createNodeParams - com.enonic.xp.node.NodeBinaryReferenceException: No binary with reference binary: Northern Lights at Tromso, Norway - lightscape-unsplash.jpg attached in createNodeParams"
]

The following zipped export was originally exported from an existing site where the image actually works as is.

I noticed by unpacking the archive and analysing the XML node file, that it actually references the path with a space before the file name, but when during the import the space is removed so the binary file cannot be found.

Since it’s an old customer database I think fixing content by content is not a solution. I think it would be good just to stop trimming the file path while importing because it may have spaces.

I don’t think this is caused by Data Toolbox.
(If it was caused by Data Toolbox, it is a 3rd party application and bugs should be registered as issues in that app’s GitHub repo)

I think this bug is caused by Enonic XP. Are you able to reproduce the bug if you use the Enonic CLI instead of Data Toolbox?

How does the content get the leading space in its name? Is it possible to do this directly in Enonic XP, or does it have to be scripted?

I think this bug is caused by Enonic XP. Are you able to reproduce the bug if you use the Enonic CLI instead of Data Toolbox?

Yes, the same error happens on Enonic CLI

How does the content get the leading space in its name? Is it possible to do this directly in Enonic XP, or does it have to be scripted?

It’s a manual process from customer. I’m not sure if they copy and paste the displayName from somewhere, or if it’s already on image file they upload. And that is something we can’t change.

I filed an issue https://github.com/enonic/xp/issues/9094

1 Like