Hi, I think I've found a bug within the upload module.

When you upload a file, the attachment table of files disappear and two scroll buttons appears to the right of the description.

Someone else experiencing this issue?

Kind regards.

Comments

NoRandom’s picture

Sorry for the bug report, after reuploading all the files it works ok now. So I assume it was an FTP uploading error.

UPDATE: It's going wrong again... so I assume it's a bug.

...regards...

NEW UPDATE: Same bug with Drupal 5.14

NoRandom’s picture

I've checked It's a problem with the "jquery update" module.

patch-works’s picture

Hello,

I've got the same problem. Properly udate jQuery update module doesn't fix it.

http://drupal.org/node/408068#comment-1379392

Could you fix the problem?

Patrice

jeffschuler’s picture

Project: Drupal core » jQuery Update
Version: 5.13 » 5.x-2.x-dev
Component: upload.module » Code
Priority: Normal » Critical

I'm changing this to the jQuery Update module, and marking Critical, as it interferes with standard Drupal behavior.

Verified the behavior on Drupal 5.18 with jQuery Update versions 5.x-2.0 as well as 5.x-2.x-dev.

If I disable the jQuery Update module and switch back to the original misc/jquery.js file, the error behavior is not present: file attachments work fine.

To see this error:

  1. (Install jQuery Update including new misc js files,)
  2. Create a new node of a type that allows for standard Drupal file attachments
  3. In the Attachments section, click Browse and choose a file
  4. Click Attach
  5. Browse for another file and click Attach

The File Attachments section disappears.
Javascript console shows:

Error: f is not a function
Source File: http://mydomain.com/misc/jquery.js
Line: 11

Clicking Preview on the entry will show that the files were successfully uploaded, but List is disabled on each, which is non-standard behavior. Every subsequent attachment throws the same error and exhibits the same effect of making the fields in the File Attachments section disappear.

PauloHaitch’s picture

Confirmed with jQuery Update 5.x-2.0 (jquery 1.2.6) and Drupal 5.15 and 5.18. Firefox 3 and IE7 & 8

Additional information:

This only happens when multiple files are attached or if the node is later edited and another file is uploaded.

The files do upload but the 'List' status checkbox gets unchecked in the process and you cannot see the files until you submit the post, then edit it again and select the list check boxes and resubmit. If you have to upload 10 files you'd have to do the above 10 times.

The bug affects FileField uploads as well as Upload Module uploads.

jayson’s picture

I'm hoping this might help a few people who have had difficulties with this as I did. I had this issue with file uploads using Drupal 5.19 and I think that it can work if you do the following two things: (1) replace the original jquery.js AND upload.js files with the ones provided by the jQuery Update module (I'm using 5.x-2.0), and (2) empty your browser cache - this was the key piece as Firefox was caching those javascript files. Once it loaded the correct ones, everything worked fine. Now I have Drupal 5.19, jQuery 1.2.6, and multiple file uploads work like a charm.

jeffschuler’s picture

Status: Active » Closed (fixed)

jayson, thank you -- you're right.

I had only copied jquery.js instead of all the new js files in misc, having followed the module's instructions on the Status report (instead of the README.)

I'm marking this as closed as the issue is solved for me.
PauloHaitch and Macarro, please change thet status back to Active if that's not the case for you.

I'm going to turn my attention to what I see as the root cause here: #347443: Conflicting instructions between code and README.

admin187’s picture

Status: Closed (fixed) » Active

I'm having the same issue. Even after updating. No idea how to fix it.

jeffschuler’s picture

@admin187, did you make sure to copy all of the new .js files (from [modules]/jQuery Update/misc into Drupal's /misc directory?

Maybe you could try out the patch at #347443: Conflicting instructions between code and README to test this...

admin187’s picture

Thank you very much for your answear. I am sure I did this, I even deleted the old files in the misc directory instead of overwriter but no effect. Maybe there is a another reason for that like interference of a different module. I dont know. I would appreciate if someone could help me. Thanks

I am using the flashvideo module, after uploading a video (which is being converted into a *.flv file) the file table disappears. It used to appear the *.flv, the *.avi and the thumbnail file. There might be a Problem with flashvideo. Any Ideas?

Kris Jenkins’s picture

I had this problem too. In the end it was because I'd mis-read the instructions above. I thought I needed to copy jquery_update/*.js across, instead of jquery_update/misc/**.

jeffschuler’s picture

@admin187 can you provide the error message from your browser's Javascript console?

jonspurs’s picture

I had the same problem and did similiar to what 'jayson' said. Though I only changed
farbtastic/farbtastic.js
collapse.js
tableselect.js
upload.js

...and it worked.

I found that jquery.js in the same misc folder is a link to ../../javascript/jquery.js at 100KB with everything formatted and version 1.2.6, but the jquery.js from http://drupal.org/project/jquery_update is around 33KB all code is in one line, different. So I've left this as it is. But can someone explain the difference please? There are also:
jquery.lite.js
jquery.min.js
jquery.pack.js

What are these?

I didn't install the module as documented, but now thinking I should have, would this make a difference? Or is it just for display in the 'Modules' section of Drupal?

Cheers,
Jon

jeffschuler’s picture

@jonspurs, see http://docs.jquery.com/Downloading_jQuery for info about these different versions of the same code.

I'm not sure why the jquery.js in your misc folder -- (are you talking about the Drupal root misc or the jQuery Update module's misc?) -- would be a link to ../../javascript/jquery.js. Is that a filesystem link that you made?

You should be replacing the files in the misc dir in your Drupal root with the .js files provided by the module.

I didn't install the module as documented, but now thinking I should have, would this make a difference?

It sounds like the fact that you're experiencing issues points to the answer being yes. :)

Or is it just for display in the 'Modules' section of Drupal?

Not sure I understand this.

aric koenig’s picture

Just to put in my 2 cents, I downloaded the new jquery_update module, copied the files from the module's misc folder to drupal's main misc folder. After that it still wasn't working so I did what the error on the status page said and copied jquery.js from /modules/jquery_update/ to the misc directory. It was a success!!

budda’s picture

My jquery_update is all upto date. just clicking the 'attach' button causes my file list to vanish.

caspercash’s picture

Thank you so much jayson! This method certainly works for me!

jeffschuler’s picture

Status: Active » Closed (works as designed)

@budda: did you make sure to copy all of the .js files (from [modules]/jQuery Update/misc into Drupal's /misc directory?

I'm re-closing this issue as everyone seems to have been falling into this same trap.

If you made this mistake, please help by reviewing the patch on #347443: Conflicting instructions between code and README that adds some auto-checking to ensure this step in the jQuery Update install process has been followed.