ajax.form.ajaxSubmit is not a function

Created on 23 January 2022, over 3 years ago
Updated 5 May 2023, about 2 years ago

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.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zengenuity

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands mlzr Zutphen

    After 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

  • πŸ‡¬πŸ‡§United Kingdom 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?

  • πŸ‡³πŸ‡±Netherlands mlzr Zutphen

    Hello @mcdruid,
    You are totally right! This post was not mended for this thread. I did something wrong, sorry!
    MLZR

  • πŸ‡¬πŸ‡§United Kingdom mcdruid πŸ‡¬πŸ‡§πŸ‡ͺπŸ‡Ί

    Okay, thanks for confirming we don't need to do anything here!

Production build 0.71.5 2024