When uploading an image file (in a field collection, not sure if that is the driver), on saving the node, the website generates an error and the node does not save. This comes from this query which hits the database

SELECT base.fid AS fid, base.uid AS uid, base.filename AS filename, base.uri AS uri, base.filemime AS filemime, base.filesize AS filesize, base.status AS status, base.timestamp AS timestamp, base.type AS type
        file_managed base
        WHERE  (base.fid IN  ('aisling-byrne316pxjpg-0'))

Somewhere (haven't figured out am afraid), the query uses the filename rather than fid when querying file_managed_base.fid.

The fix for this (for the moment) is to switch the widget from standard 'Image' to 'Media File Selector' - so this is a note on a workaround but also a potential bug.


Dave Reid’s picture

Status:Active» Postponed (maintainer needs more info)

I would be surprised if that query came from either Media or File entity. Can you help me figure out what code is actually triggering that query?

mscalone’s picture

Same error but not working even selecting 'Media File Selector'
any idea?