Hi there.

I have been trying to figure this out for sometime and have read through previous issues.

When I upload a file into my filefield the file uploads and the form is shown again. However, any additional uploads cause the fieldset to disappear completely. On submission, my upload has been saved. Thus, to upload more than one file I need to Upload, Submit, Edit, Upload, Submit etc. This is not ideal as one might guess for users, particularly that the form disappears and any user not in the know will think their Upload has effectively been "lost".

As you can see, the Upload works, so it is not the Devel module. Which I have had problems with, and disabled immediately.

Any Suggestions? Any information that I can provide?

Comments

dopry’s picture

Status: Active » Postponed (maintainer needs more info)

Are you hitting a memory limit? I think the behavior you describe would be more widely reported if it were a bug and not a configuration or theme error.

winderster’s picture

I have the same problem!

just like this:
http://vimeo.com/2116088?pg=embed&sec=2116088

aleighs’s picture

I'm also having the same problem exactly as stated.
* First upload works
* Second upload makes the field disappear
* Information appears when node is submitted.
* I also thought there was a devel conflict, but unistalled and am still experiencing the problem.

Happy to provide additional info if helpful.

aleighs’s picture

Well, I solved my conflict. In case it helps anyone: I had jquery update installed, upgraded my drupal core files and neglected to replace the necessary .js files in core misc folder; once replaced, everything is working just fine.

riverfr0zen’s picture

I did *not* have jquery_update installed, but was experiencing this issue. So, I installed jquery_update, copied all the .js files from /modules/jquery_update/misc to /misc, and it works fine now.

AndyThornton’s picture

Hi all,

I hope I am pitching in on the right problem here. I have an issue with a site I have created that used FileField. If a user uploads a file and then clicks 'Edit' they do not see the file listed (this matter was raised earlier but the bug seemed to die a death and got closed).

There are two things that may be relevant (to someone who understand drupal and this module more than me)

1) As User 1 I do not observe the problem. I click Edit and the uploaded files are listed. Of course, my first thought was 'ah ... i must not have granted people the right permissions'. I don't think that is the case, though (my users have the single FileField permission set - 'view filefield uploads).

2) Now this is the odd one that I cannot explain. Rather than post a bug on a forum I wanted to try and drill into the problem a bit. Purely for debugging purposes I thought I'd do a print_r on what gets passed to common.drupal_render. My rationale for this was that I wanted to see whether FileField was telling drupal_render to render that part of the form in both a working (User 1) and a broken (everyone else) scenario [i figured i could then work either up ... into FileField ... or, less likely, down into drupal_render]. When I do this, of course, I got a lot of output, way more than I would have sensibly been able to go through. HOWEVER, when I did that print_r ... the description etc field comes back. So, basically, my ugly debug code had some sort of side-effect that caused it to work. At first I thought I had smoked too much crack, but it really does happen. If I removed print_r ($elements) from the top of common.drupal_render my page does not display the description etc field (on the Edit page). If I add that line ... it does.

Sorry I cannot give any cause, but I am still going to work on it (in my crude way - I am java programmer and still new to php and drupal).

I am using Drupal 5.8 and FileField 5.x-2.3/

Thanks,
Andy

p.s. the actual problem of that sub-form disappearing is not browser specific (happens with both IE and FF at least)

AndyThornton’s picture

A little update. I am using the CCK fieldgroup feature. I found that when i embed my FileField inside a fieldgroup I do not get the description etc on the edit page. If the FileField is outside of a fieldgroup it works fine. Perhaps this is a missing piece of the puzzle which explains why some people see the problem and others insist it does not exist.

cheers,
andy

AndyThornton’s picture

Another update.

Okay, I know my 'fix' is not great but what I found was that it is something to do with a collapsible fieldgroup inside a collapsible fieldgroup (in conjunction with IE7). If people are also experiencing the missing table (with the description and file size) then you may find it is because you have embedded your FileField in a collapsed fieldgroup. So one fix is to take it out again!

I chose (rightly but probably wrongly) to make a slight tweak to FileField.module. There is a line that looks like this:

$form[$fieldname] = array(
'#type' => 'fieldset',
'#title' => t($field['widget']['label']),
'#description' => t('Changes made to the attachments are not permanent until you save this post.'),
'#weight' => $field['widget']['weight'],
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#tree' => TRUE,
'#prefix' => '

',
'#suffix' => '

',
);

I changed '#collapsible' => TRUE, to '#collapsible' => FALSE, .... and it fixes the problem. Of course, it means I cannot collapse my filefield, but I never wanted to anyway. Don't hate me ... just trying to get through the week as best I can ;-)

riverfr0zen’s picture

Been reading through your comments, but haven't had a chance to recreate them yet. However, my problem was not limited to IE 7 -- I was testing on firefox 3 (and my field was not in a fieldset), so not sure if it's the same problem, or that you are experiencing a 'mutation' (heh) of the problem by having the items in a group. Have you tried to replicate in firefox?

dopry’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

There is a js error happing that it breaking the field collapsing? If this is still an issue in 2.4 please open a new issue.

pcorbett’s picture

Version: 5.x-2.3 » 5.x-2.4

5.x-2.4 fixed this issue for me, but I think it's also good to point out that you may need the latest jquery_update and the /misc files updated in core as well. I vote to mark this as "fixed."

omnyx’s picture

I have the same problem. I use FileField 2.4 and have the latest jquery update installed (and files copied to /misc folder). First file is uploaded without any problems but when I click to upload the next the whole field just disappears.

interesting thing is that i have the image field on the same page and multiple file upload for that field works fine, so i'm pretty sure it's filefield issue. I tried removing the imagefield and having only filefield. It didn't change anything.
though - the same thing happens with the regular drupal's file attach box. When I try to upload multiple files it behaves the same way (?!)

It's also not browser specific.

ideas?
thanks

UPDATE: I tried this on four different websites (not necessarily on the same hosts). One of them doesn't use jquery update module and the regular drupal's (multiple) file uploads work fine. The same is true for the second one that uses jquery update version 1.0. The remaining two use jquery update v 2.0 and they both don't work.

omnyx’s picture

Status: Closed (fixed) » Active

UPDATE: This is fixed though I'm not sure what I did. I first disabled jquery update module (and everything that depended on it) and copied jquery.js from the website that uses jquery update 1.0. It worked. So I enabled jquery update module again and copied all of its files back (including replacing jquery.js v1.0 with jquery.js v 2.0)

now it's working. I have no idea why

raystin’s picture

sub

Ira Rabinowitz’s picture

Is this happening in IE8 and not in other borwsers? I had this problem with IE8 and Drupal version 6.x-3.1.

I found a workaround!

hillaryneaf’s picture

In particular it seems the upload.js file in /misc/upload.js needs to be replaced with the one from modules/jquery_update/misc/upload.js

I only replaced that one and it fixed my issue.

hdcwebteam’s picture

I had this same problem with jquery_update installed correctly.

My solution was excluding upload.js from javascript aggregation (under Performance).

plasticlax’s picture

hdcwebteam, where do you see those settings. i just have "aggregate css" enable/disable.

quicksketch’s picture

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

Closing after lack of activity. Support for Drupal 5 is at an end.

bduell’s picture

That solved my issue - thanks!!!