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.
Problem/Motivation
After installing 4.x-dev, when trying to use a file field ajax upload button, you get an alert error message saying that "ajax.form.ajaxSubmit is not a function". This is because the jquery.form library is not being included on page load.
This has been reported previously on the 3.x branch with no resolution: #2874776: ajax.form.ajaxSubmit is not a function
Steps to reproduce
Set up a content type with a file field.
Install jquery_update-7.x-4.x
Set jquery version to 1.12.
Try to upload a file using the Upload button so it happens over ajax.
Proposed resolution
Patch attached that fixes the issue.
Remaining tasks
Review patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | jquery_update-ajaxSubmit-3260020-2.patch | 1.1 KB | zengenuity |
Comments
Comment #2
zengenuity CreditAttribution: zengenuity at DrupalTutor / Zengenuity commentedComment #3
rkdesantos CreditAttribution: rkdesantos as a volunteer commentedThis patch solved the problem for me.
Comment #4
butterwise CreditAttribution: butterwise commentedPatch in #2 alleviated my woes.
Comment #6
mcdruidLooks like I missed this in b74731f8d.
Thank you!
Comment #8
MLZRAfter install "Imagefield Slideshow" and edit the Imagefield in the Layout Builder: first time seem to save. Bud the settings are not saved. So I go back to LayoutBuilder and tje Image Slideshow settings. When save I have this error (ajax.form.ajaxSubmit is not a function).
After the patching with this patch the error dissapeared.
Thanks for the good work!
Marcel
Comment #9
mcdruid@MLZR this patch was committed to 7.x-4.x over a year ago and is included in all the stable releases (7.x-4.1 being the latest at the moment).
I'm not sure what you needed to patch to fix your problem?
Comment #10
MLZRHello @mcdruid,
You are totally right! This post was not mended for this thread. I did something wrong, sorry!
I can't remove it, can you?
MLZR
Comment #11
mcdruidOkay, thanks for confirming we don't need to do anything here!