In Importer.php, copyFileAssociatedWithEntity() looks for the physical file using basename($entity->getFileUri()). When the URI is URL-encoded (e.g. public://my%20file.jpg), basename() returns my%20file.jpg, but the actual file on disk was exported using $entity->getFilename() which returns the decoded name my file.jpg. The file is then reported as not found.

Fix: Add a fallback to try $entity->getFilename() when basename($destination) doesn't find the file. Patch attached.

Issue fork drupal-3603970

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

priyankapatel created an issue.