Hi,

Imagecache creates an error log level entry when source file is missing. This log level should be lower, so it's a common situation when a node or source image is deleted o modified, and there are still links to imagecache processed file, like from google images.

This error messages are annoying in special when using logging and alerts module or similar, so the webmaster receives lots of automatic notifications about something that is normal.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

storytellerjeff’s picture

Thanks for the patch, it does work, but now I have pages of warning messages in my error log.

The messages are 404: Unable to find... but in each case its for a handful of images that I deleted in the past - I deleted both the uploaded image and the imagecache processed file, but am still getting loads of these messages on every cron run (from the boost crawler, I think). I've flushed my caches and flushed the imagecache presets that were being effected and still get warning messages.

I'm happy to hear that this is normal, but is there anyway to get rid of the links to deleted files?

sandrewj’s picture

Status: Active » Reviewed & tested by the community

Patch looks good. Could be rerun against dev, but it is only a 6 character patch.

re storytellerjeff: no, some outside source has copied/bookmarked/crawled your images. The same messages would show up if somebody mistyped a path to a preset image.

storytellerjeff’s picture

re:sandrewj: ah, understood, thanks for the info.

ChrisLaFrancis’s picture

Was having the same problem and this patch works for me with 6.x-2.x-dev. Thanks.

fizk’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

This really depends on how important it is to you that images are missing.

Since this is a very minor tweak that you could do on your own, I'll leave this as it is.

lambic’s picture

Status: Closed (won't fix) » Reviewed & tested by the community

What's being reported is basically a 404, so it should be logged in the same way as standard Page Not Found entries, logging it as an error doesn't make sense in most cases.

manuel.adan’s picture

I'm using logging_alerts module to get notice via e-mail about ERROR or higher severity level log entries, so I have my inbox busy when an image is removed by users, and crawlers try to reach it.

Drupal core registers not found events as NOTICE. An ERROR is something important enough to check and solve, a deleted image is not such. It is not a cosmetic change or something subject to my discretion, each log level has a meaning.

fizk’s picture

Marking as ImageCache 3.x Todo.

ChrisLaFrancis’s picture

Just to throw my two cents in, I agree with lambic and arcovia in that it seems more consistent with the rest of Drupal to log these missing images as notices instead of errors.

As fizk points out, changing this log level is a trivial patch, so shouldn't it be that the default is consistent (i.e., a notice), and if someone needs it to be an error (I'm sure a minority), they can manually change it from notice to error?