Closed (fixed)
Project:
FileField
Version:
5.x-2.2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
12 Oct 2007 at 19:47 UTC
Updated:
6 Feb 2008 at 01:11 UTC
theme_filefield_icon() suggests that there should be a series of icons for various mime-types in an ico directory. In my download of 5.x-2.2, however, there is no such directory. Moreover, the code does not do a file_exists() check on the $imagepath. The result is continual invalid image URLs and therefore lots of 404 errors (which has a negative impact on performance).
Either the $imagepath needs to be checked with file_exists(), or the icons need to actually be provided, or ideally both. :-)
Marking as critical since a module should not be generating 404s to its own files during normal operation.
Comments
Comment #1
jpetso commentedConfirmed, this is highly suboptimal. What I'd like to have is a solution that not only checks file_exists() but also uses mimetypes instead of extensions to determine the filetype icon. Let's see when I can get it done.
Comment #2
dopry commentedfixed in DRUPAL-5--2
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.