I have installed the last version of Filefield (3.7) and can't get Ajax upload to work. Everytime I click the "Upload" button, the page refreshes and the file is not upload by Ajax (without page refresh).

Some server info:
Drupal: 6.19
PHP: 5.3.2-1ubuntu4.5
Web server: Apache/2.2.14 (Ubuntu)
jQuery UI: 1.6
jQuery Update: 1.2.6

CCK: 6.x-2.8
Filefield: 6.x-3.7

If more info is needed, just ask.
Thanks in advance!

CommentFileSizeAuthor
#3 installed_modules.txt35.64 KBtugis

Comments

tugis’s picture

Forgot to mention that the file is indeed correctly uploaded and the file preview is also correct, just the Ajax functionality is not working.

quicksketch’s picture

Category: bug » support

This problem does not exist on fresh installations of FileField on a clean install of Drupal. I'll need steps to reproduce from a clean install in order to inspect this problem. Most likely there's a JavaScript error on the page caused by some other script or module that prevents FileField's JavaScript from working correctly.

tugis’s picture

StatusFileSize
new35.64 KB

You are right, with a clean installation, I have the upload working as supposed without page refresh. In the Javascript I get no errors, but doing some debugging on the FileField JS I see that not all script is passing.
In attachment there is a list of the modules I have currently installed. I'm trying to find which module prevents FileField JS from firing correctly.

quicksketch’s picture

The most likely culprit are modules that change the HTML output of the node form. You might also try changing your theme to one that comes with core (like Garland), and seeing if that helps.

tugis’s picture

I tried putting a default theme but the result is the same.

Looking at the HTML I notice that the problem should be related with AHAH. In the working installation, upload button has the "ahah-processed" class (in the non-working it doesn't) and the ahah urls are defined in jQuery.extend code. I disabled and uninstalled many modules I wasn't using, but I couldn't find yet what may be causing this problem.

tugis’s picture

I solved the problem. I don't know why but I had some commented code in the FileField module which was preventing the AHAH processing. Thanks for the tips! You can close the issue.

quicksketch’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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