Filefield uses default image path that was initially configured so when filesystem path changes default image breaks.

CommentFileSizeAuthor
#2 filefield_default_image_1172704.patch883 bytescrea
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

crea’s picture

Title: Filefield default image doesn't support changing file system path » Filefield hardcodes default image, making impossible to change file system path and introducing data inconsistency

Actually, it's major source of inconsistency because (authoritative) information source (files table) is ignored.

crea’s picture

Status: Active » Needs review
FileSize
883 bytes
quicksketch’s picture

Thanks, although changing the filesystem path is pretty difficult already and not recommended, there's no reason why we need to make that more difficult. Unfortunately this will add another query to every page load, which is why I'm guessing we didn't just use field_file_load() to begin with.

crea’s picture

It's already possible to clone sites in Aegir, making sort of sandboxes, with filesystem path changing in the process. I never heard about it being not recommended. It's not user-friendly, sure, but definitely doable and not difficult.
This will add one perfectly optimized query (which should run in under 1ms) to page loads with default images. Since when we are afraid of making queries ?