When trying to use the "autocomplete" filefield source to put an existing image file into the fielfield, the autocomplete field does not display the existing filename, but shows insted "null". When saving the node, the file is added, at least if blind guessing caught the right filename.

I don't need to say that this "null" output severely limits the usability of 'FileField Sources'.

Used modules:

  • FileField 6.x-3.5
  • FileField Meta 6.x-3.5
  • FileField Sources 6.x-1.1
  • ImageField 6.x-3.3

Used theme to edit nodes: Magazeen (unaltered)

CommentFileSizeAuthor
#1 filefield-autocomplete.jpg21.62 KBasb

Comments

asb’s picture

StatusFileSize
new21.62 KB

Screenshot attached for illustrating the above described (mis-) behaviour.

quicksketch’s picture

I haven't been able to reproduce this problem, it might be related to #834018: Data serialized in a field's data column is lost after field_file_load if filefield_meta in use.

asb’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for the pointer; I'm still investigating this.

I'm currently suspecting that 'FileField Paths' (installed: 6.x-1.4) is somehow interfering since I'm now getting files from the same CCK field but not those from another CCK Imagefield ('Views Gallery'). The broken display from the screenshot was caching related, I think, and it is gone since I disabled CSS/JS aggregation/optimization. Also, in the meantime I have disabled 'FileField Meta' (because of another issue).

I'll report back later with my findings...

Greetings, -asb

quicksketch’s picture

Thanks asb.

asb’s picture

Status: Postponed (maintainer needs more info) » Active

The behaviour seems pretty simple: 'FileField Sources' can not reuse image files which were uploaded into another filefield.

My configuration: Two fields are configured to use filefield plus imagefield plus imagecache: 'field_gallery_image' (imagefields as image nodes, default from 'Views Gallery'), and a custom content type with 'field_illustration_image' (also using filefield plus imagefield plus imagecache, also configured with imagefields as image nodes). Both fields are configured at ./admin/content/node-type/gallery-image/fields/field_gallery_image respectively ./admin/content/node-type/illustration/fields/field_illustration_image with the following seetings:

  • Enabled sources: Autocomplete reference textfield (checked), Remote URL textfield (checked)
  • Autocomplete reference options: Match file name: Contains string (checked)

'field_gallery_image' stores it's images at the location 'photos' (also default from 'Views Gallery'); 'field_illustration_image' stores it's images at the location 'illustrationen'. The paths are managed through the 'FileField Paths' module.

The field 'field_illustration_image' is attached to several content types and should simulate what the contributed 'image' module provides with the 'Image Attach' submodule: the re-use of existing images. With the "autocomplete" filefield source I can access image files that were uploaded into the 'field_illustration_image' field on image nodes of my custom content type 'illustration'; the field is unable to access images uploaded into the 'field_gallery_image' field on 'Views gallery' image nodes.

I hope this helps...

Thanks & greetings, -asb

mikou’s picture

subscribe. I don't have null. But it appears that I can't use files from another filefield. Is this a normal behavior ?

asb’s picture

quicksketch’s picture

Category: bug » support
Status: Active » Closed (fixed)

I don't have null. But it appears that I can't use files from another filefield. Is this a normal behavior ?

Yes, it is normal behavior and currently by design. See #730578: Options for Autocomplete (restrict file list) as asb recommends.

I still can't reproduce this as any sort of bug (showing "null" instead of a file list). If reuse of files between fields is the only problem here, this issue should be closed. Please reopen if this is not the case.

asb’s picture

Title: Autocomplete soure does not autocomplete filename » Autocomplete sources does not autocomplete filename

Yes, reuse of files between fields is the real problem here. Showing a "null" values disappeared after a while, and I guess that this had to do with caching (cf. the broken styling as shown in #1). I'd highly recommend to clear the Drupal caches after installing 'FileField Sources'.