Did a fresh install of D7 with the standar profile and activate filefield source on the article image field
when i use the transfer,select or attach the image uploads well but the image doesn't show up via ajax
I get this error in the drupal log
Notice: Undefined index: #suffix in file_ajax_upload() (line 274 of /home/user/public_html/drupal7/modules/file/file.module).

great work

Comments

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not able to reproduce this issue. What do you mean by "the image doesn't show up via ajax"? The file is attached to the node successfully but it doesn't have a thumbnail? Does everything work as expected with the normal upload option?

rodrigoaguilera’s picture

Ok, I'm refering to the file information box with the thumbnails and the operations buttons that doesn't get updated with the new file added. I configured the field to have unlimited items. The file is attached well but you can only notice after saving the node. The normal upload option works fine.

when the transfers ends the textfield where you enter the URL disappear, and the you have to click on Upload o remote URL to get it again (I'm only activating remote URL for testing).

I've tested this on php 5.2 and 5.3. always fresh instalations of D7 with standar profile and the article nodetype.

and a couple of warnings I'm getting while navigating through the fields interface (I guess they are related to filefield sources because they are gone when I disble & uninstall filefield sources)

Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home/www/drupal7/includes/entity.inc).

and

Theme key "token_help" not found.

thanks for the attention

jeffwidman’s picture

sub

didox’s picture

subscribe

manveru’s picture

Notice: Undefined index: #suffix w file_ajax_upload() (linia 274 z /home/manveru/www/new.manveru.pl/htdocs/modules/file/file.module).
I have same problem, I cannot see any file uploaded on server to be attached to node. Additionally I have entries in my log about improper POST FORM sent (I do not cite here as it is in Polish).

quicksketch’s picture

Hi guys, thanks for the updates. Could someone post screenshots for further clarity?

quicksketch’s picture

Title: Uploads not showing up » Files attached through sources do not show up in the list of multiple-upload fields
Status: Postponed (maintainer needs more info) » Active

Okay, what everyone seemed to not include in this report is the fact that this problem only occurs on multi-value upload fields, which makes the problem much easier to reproduce. I'm taking a look at this now.

quicksketch’s picture

So I've found the crux of the problem but it's proving difficult to resolve. Here's a temporary workaround (works on all sources except IMCE): Select the file you want using the source of your choice, but do NOT click the button for that source, switch back to the "Upload" source and click Upload, without selecting a file. The "Upload" button will properly process any source that has been utilized.

The problem is around the buttons used for other sources, currently they do not handle multiple values correctly. I'm trying to figure out how we can make all the buttons behave consistently.

quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new5.8 KB
new10.05 KB

Okay, man this one was a doozy. In Drupal 7, the entire form is rebuilt after calculating form values. Because filefield_sources displays differently depending on if a file is selected or not, we were setting #access on the source fields after the value had been calculated. Unfortunately this made validation then fail, because Drupal thought the user wasn't suppose to access that field (even though they just used it). This patch switches us from using #access in the form building process and moves to to a pre_render function, making it match the approach used by File module.

This patch also includes various other fixes regarding validation and errors, and I've committed another round of backports to the Drupal 6 branch.

quicksketch’s picture

My pre_render() function needed a little more work. I've committed these follow-up patches.

rodrigoaguilera’s picture

Awesome!

althoug that two warnings are still there when editing the filefield everything works fine.

Thanks

Status: Fixed » Closed (fixed)

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