Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Installing the jQuery Update module on a Drupal 7 website breaks the upload of images in the content creation process. Uploading an image usually results in the display of a thumbnail of the image (with options for adding alt and title information). With jQuery Update, the upload throbber continues to spin endlessly. Removing jQuery Update solves the problem.
Comment | File | Size | Author |
---|---|---|---|
#17 | jquery_update_7_jquery_1.5.zip | 637.24 KB | fatcrobat |
#10 | jquery_update_jquery.form_.js_to_jquery1.5_port.patch | 37.42 KB | fatcrobat |
Comments
Comment #1
Lennard CreditAttribution: Lennard commentedYes i can say the same. Thats modul is not really worked.
Its not only Upload does not work the delete of exists files are blocked too.
Its really must be fix. The Version before has worked fine this is a back step.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI've just spent several days trying to track down why image uploads & deletes were no longer working on my site. Turns out it was this module (I was 7.x-2.x-dev, but just now tested 7.x-2.0 & got the same result.) Disabling the module restores image upload & delete capability.
Comment #3
DerekAhmedzai CreditAttribution: DerekAhmedzai commentedYes, same here. I spent hours trying to troubleshoot broken uploads - disabled jquery update and they were fine again.
Comment #4
santam CreditAttribution: santam commentedI can second the issue. Seems that enabling the module breaks all upload actions. For example I had a form where people had the option to add more text fields one after another. Even the add another item button did not work as the throbber never stopped. There was the same issue with the image field too. Disabling jquery module allowed all these to get back to normal. Another interesting thing was it also affected the auto tag term reference field functionality making it slower and less responsive
Comment #5
emackn CreditAttribution: emackn commentedyep.. same here.
The file will upload, but the throbber will never disappear.
Reloading the page displays the file.
File removal is broken, there is a "b.handleError is not a function" error from firebug.
Comment #6
sahaj CreditAttribution: sahaj commentedsubscribe. was wondering what was the reason of this.
Comment #7
bigsyke CreditAttribution: bigsyke commentedSame here
Comment #8
nunof CreditAttribution: nunof commentedSubscribing
Comment #9
cloviscoli CreditAttribution: cloviscoli commentedSubscribing
Comment #10
fatcrobat CreditAttribution: fatcrobat commentedjquery 1.5 includes a large rewrite of the ajax module. So in addition they implemented a new Deferred callback management system. Seems like, the old $.handleError function is no longer part of jQuery 1.5.
The following patch includes an update of the jquery form plugin.
Fileupload is working as expected. Don't forget to clear your cache.
Please test and give feedback.
Comment #11
sahaj CreditAttribution: sahaj commentedAfter having applied the patch #10, getting this error message while trying to remove image :
An error occurred while attempting to process /.../file/ajax/field_image/und/0/form-IzKh9zuy6FvHtHK5SVK2uK4tsKbi7fFx6qj0-HpUg1o: Result of expression 'ajax.form.ajaxSubmit' [undefined] is not a function.
Comment #12
fatcrobat CreditAttribution: fatcrobat commentedThe patch creates two new files in the jquery_update/replace/jquery folder.
Please check, for jquery.form.js and jquery.form.min.js.
Cleared your cache? Adding and removing images works for me as supposed.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedI applied the patch, & got the same error as #11. It looks like the patch creates the 2 files listed in # 12, but places them in the module's root directory. Moving them to the correct folder fixes the error & patch works as desired.
Comment #14
fatcrobat CreditAttribution: fatcrobat commentedMhh, tested it locally in my eclipse ide running the project as git repository...strange. Did you guys applied the patch from the jquery_update folder, or drupal root?
Comment #15
TimG1 CreditAttribution: TimG1 commentedSubscribing.
In my case the file is actually uploaded to the directory, however the thumbnail doesn't appear and the throbber just keeps running.
If you just close out of the node edit form without saving then the image field is not saved, but the file is still sitting in the /files directory on the server. However, if you go ahead and save the node instead of closing the form, then the image is saved in the image field and the preview can be seen.
Just applied the patch in #10 and it seems to be working as expected now. =)
-Tim
Comment #16
davidsanger CreditAttribution: davidsanger commentedI am brand new to Drupal and beginning work on my first, simple Drupal 7 site and came upon this bug.
Is there a simple way to apply this patch (eg. instructions) or will an updated version of Drupal Core or some module take care of it very soon?
Right now I have an image on my front page I cannot remove.
thanks
Comment #17
fatcrobat CreditAttribution: fatcrobat commentedhere you are ;)
Comment #18
RobLoachYup yup yup! Thanks a lot :-) .
Comment #19
davidsanger CreditAttribution: davidsanger commentedthanks, get it now.
that seems to have done the trick.
Comment #20
mfer CreditAttribution: mfer commentedjQuery form 2.67 is now out. It is included in the latest code in the 7.x-2.x branch as a replacement. Please test and let me know if there are any issues.
Comment #21
jvendryes CreditAttribution: jvendryes commentedHow do we get the latest update with 2.67 included? I just downloaded the latest 7-1.x-2.1.tar.gz and it appears that 2.52 is still included?
Nevermind, for some reason the latest jquery-form isnt being pulled into my site...
Comment #22
fatcrobat CreditAttribution: fatcrobat commentedhttps://github.com/malsup/form
download and replace
Comment #23
mfer CreditAttribution: mfer commented2.67 is already in jQuery Update 7.x-2.1. If it is not loading it's not because the file isn't there... http://drupalcode.org/project/jquery_update.git/blob/8a3a09fe9cfd23163ef...
Comment #25
iLLin CreditAttribution: iLLin commentedTo open this back up I'm not sure why everyone elses is working and mine doesn't load.
In system.api.php in Line 699:
This overwrites the jquery_update_library_alter back to the base misc/jquery.js file.
I added:
This fixed it. I didn't provide a patch yet as I am unclear why people say they have this working?
Comment #26
iLLin CreditAttribution: iLLin commentedComment #27
mfer CreditAttribution: mfer commented@iLLin For this module to work you just download and enable it. Nothing more is needed.
What is in system.api.php is never called. This is documentation for hook_js_alter. jQuery Update does not use this hook anyway.
Comment #28
iLLin CreditAttribution: iLLin commentedWell its called on my setup and thats why this hook did not work. I know jQuery Update does not use this hook and if you read, that is what I used to fix it. I am re-opening this back-up and I will track why my install is different than yours as the system.api.php is overwriting the misc/form.js data array.
Comment #29
mfer CreditAttribution: mfer commented@iLLin system.api.php is a documentation file. It should never be loaded and used in a site. It is present for documentation purposes as are all files ending in .api.php. This issue is not related to jquery_update.
If system.api.php is loaded on your site there is a problem with your installation. None of the .api.php files should be loaded in a drupal page load. Something is breaking your install. If you want to track this open up a new support request ticket. Fixed bug reports not relating to your issue should remain closed.
Comment #30
iLLin CreditAttribution: iLLin commented@mfer I gotcha. I will try to track it down, it seemed related to this issue but your right the system.api isn't called (thx for clarifying the use of that file).
Comment #31
ucaka CreditAttribution: ucaka commentedIf someone is experiencing the issue of not loading the correct version of jquery.form.js like iLLin. Check if some of the installed modules aren't using drupal_add_js() to add the jquery.form.js file on every page.
Comment #32
sstedman CreditAttribution: sstedman commentedI saw this same issue after upgrading a D6 site to D7. Popups API remains intact as a D7 module, even though there is not a D7 version of the module. It was left enabled until an Image Field was set up for multiple image uploads and fired this error. The upgraded Popups API was indeed calling jquery.form 2.52 and overwriting jQuery Update's jquery.form 2.64.
For any one out there who sees this edge case after upgrading D6, disable and delete Popups API, Popups: Administration Links and Popups: Test Page.
Comment #33
mr.andrey CreditAttribution: mr.andrey commentedFor reference:
To make #10 work with jQuery 1.7 and latest jquery_update in D6, do the following:
Apply patch in #10. First part will fail, don't worry.
In jquery_update.module, find this:
'misc/jquery.form.js' => 'jquery.form.js',
… and replace with this:
'misc/jquery.form.js' => 'jquery/jquery.form.js',
Now "Add another item" works fine.
Cheers,
Andrey.
P.S. One of many fixes to make jQuery 1.7 work in D6 with views/panels/etc... don't bother unless you have a really good reason.
Comment #34
spesso CreditAttribution: spesso commentedRef: #31.
In my case that was the Multiupload Imagefield Widget / Multiupload filefield Widget modules: adding the js_alter suggested in #25, after the patches, solved the problem.