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

jpetso’s picture

Assigned: Unassigned » jpetso

Confirmed, 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.

dopry’s picture

Status: Active » Fixed

fixed in DRUPAL-5--2

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.