Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since the new version, import remote images (and probably files) no longer works.
Feeds log: Invalid enclosure http://www.website.com/image.jpg
Drupal log: File temporary://filek2J1Ov could not be copied, because the destination directory public://field/imagepublic://field/image is not configured correctly.
The problem is in the file feeds/plugins/FeedsParser.inc at line 353:
We must replace
$destination .= trim($destination, '/') . '/';
by
$destination = trim($destination, '/') . '/';
(Remove the dot concatenation)
Comments
Comment #1
coreyp_1 CreditAttribution: coreyp_1 commentedMarked #1612246: Invalid enclosure on image import due to code error as a duplicate of this issue.
It contained the same fix, with several people reporting that it solved the problem for them.
I also have used this fix successfully on a production site. It's a huge break in important functionality, so I'm upping the priority on this.
[EDIT]
Adding that the error was introduced here: #1515204: Malformed destination uri in FeedsEnclosure
Comment #2
Rob_Feature CreditAttribution: Rob_Feature commentedSorry but I'm actually going to flip-flop these duplicates because there's more responses and confirmed tests on the other issue...marking THIS a duplicate of that one and reopening that instead (the closed issue should always be the one with fewer responses)
Duplicate of #1612246: Invalid enclosure on image import due to code error so please follow up on that issue instead.
Comment #3
wel3kxial CreditAttribution: wel3kxial commentedIt is already
$destination = trim($destination, '/') . '/';
but still Invalid enclosure ....... jpg