Active
Project:
Drupal core
Version:
main
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2026 at 08:05 UTC
Updated:
18 Jun 2026 at 08:30 UTC
Jump to comment: Most recent
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.
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