Invalid enclosure <em class="placeholder">

Created on 14 December 2025, about 1 month ago

Good day all,

I am having an impossible time configuring a feeds tamper rewrite rule. But let me explain the setup of my website which is a radio website .

For many years I have been using the feeds importer in combination with the file (field) paths module to import metadata from my audio backend (Radiologik DJ) into my radio website.

The audio backend will upload a xml file (metadata) and a jpg file (cover-art) into my website’s public directory (public://feeds).

I use incrontab to monitor the feeds folder for changes (IN_MODIFY) and trigger DRUSH to start the import of the metadata to create/update node-pages for each title ever played on my Webradio website. Listeners can rate songs or comment on them on these node-pages.



I have been using the file (field) paths module to rewrite the artwork (which is always named art-00.jpg by Radiologik DJ) with a cover name consisting of tokens like this [artist] – [album]. Thus the file name ’art-00.jpg' is for example turned into ’Iggy Pop – Success – Lust for Life.jpg’ and moved from the feeds folder to the appropriate image folder.

The reason for changing a running system.

I have been noticing errors in the image styles appearing from time to time where the small versions of the original images were more often displayed with a place-holder image. The cause, which I finally discovered, was the fact that my import process was overwriting existing image files thus giving a new FID and breaking the links for the image styles.

Unfortunately File (field) paths does not offer the options to skip existing files. But I noticed that the feeds module can skip just the image import when a file exists while still importing the rest of the data. If only it could rename the new files instead renaming and numbering them.

Then I discovered this feeds tamper function: public://feeds/art-00.jpg -> Image: URI where I can rewrite the file name with tokens like that: [artist] – [album]. And this is where my problems with the configuration really started. All of these did not work:

Nothing I put in here did the trick.

Here is a sample of some of the errors that kept showing um in my ’recent log messages’:

FeedsHTTPRequestException: Download of Hania%20Rani%20–%20Portico%20Quartet%20&amp;%20Hania%20Rani%20EP.jpg failed because its scheme could not be determined. The URL is expected to start with something like 'http://'. in /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/libraries/http_request.inc:409

Invalid enclosure <em class="placeholder">Hania Rani – Portico Quartet &amp; Hania Rani EP.jpg</em>

Invalid enclosure <em class="placeholder">http://test.zoootradio.com/sites/default/files/feeds/Eric Burdon &amp; the Animals – Eric Is Here.jpg</em>

FeedsHTTPRequestException: Download of http://test.zoootradio.com/sites/default/files/feeds/Eric%20Burdon%20&amp;%20the%20Animals%20–%20Eric%20Is%20Here.jpg failed with code 404. in /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/libraries/http_request.inc:409
Stack trace:
#0 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/plugins/FeedsParser.inc(448): http_request_check_result()
#1 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/plugins/FeedsParser.inc(514): FeedsEnclosure->getContent()
#2 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/mappers/file.inc(190): FeedsEnclosure->getFile()
#3 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/plugins/FeedsProcessor.inc(955): file_feeds_set_target()
#4 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/plugins/FeedsProcessor.inc(901): FeedsProcessor->mapToTarget()
#5 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/plugins/FeedsProcessor.inc(443): FeedsProcessor->map()
#6 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/includes/FeedsSource.inc(526): FeedsProcessor->process()
#7 /var/www/html/www.zoootradio.com/htdocs/sites/all/modules/feeds/feeds.module(278): FeedsSource->import()
#8 phar:///usr/local/bin/drush/commands/core/drupal/batch.inc(163): feeds_batch()
#9 phar:///usr/local/bin/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#10 phar:///usr/local/bin/drush/includes/batch.inc(98): _drush_batch_command()
#11 phar:///usr/local/bin/drush/commands/core/core.drush.inc(1212): drush_batch_command()
#12 phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_batch_process()
#13 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks()
#14 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#15 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()
#16 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#17 phar:///usr/local/bin/drush/includes/startup.inc(462): drush_main()
#18 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main()
#19 phar:///usr/local/bin/drush/drush(114): drush_startup()
#20 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#21 {main}

Invalid enclosure <em class="placeholder">http://test.zoootradio.com/sites/default/files/feeds/Eric Burdon &amp; the Animals – Eric Is Here.jpg</em>

Modules used:

  • Feeds Admin UI 7.x-2.0
  • Feeds extensible parser 7.x-1.0-rc2
  • Feeds Fetcher Directory 7.x-2.0
  • Feeds Import 7.x-2.0

  • Feeds Tamper 7.x-1.2
Feeds Tamper Admin UI 7.x-1.2
  • File (Field) Paths 7.x-1.2 (patched to allow replace file)

I am posting this in the issue section of feeds and feeds tamper since I do not know where it is best placed.

I hope someone has some advice for me.

Best wishes,
Paul

💬 Support request
Status

Active

Version

2.0

Component

Documentation

Created by

🇩🇪Germany paul_constantine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024