AJAX progress type and effect is empty by default which generates error Ajax response: TypeError: $newContent[effect.showEffect] is not a function

Created on 27 October 2023, about 1 year ago
Updated 30 October 2023, about 1 year ago

Problem/Motivation

default AJAX configuration is not used when creating new forms
missing values cause JS error with Drupal 10.1.x
An error occurred during the execution of the Ajax response: TypeError: $newContent[effect.showEffect] is not a function

Steps to reproduce

configure AJAX settings at admin/structure/webform/config

  • Use Ajax for all webforms: false
  • Default Ajax progress type: throbber
  • Default Ajax effect: fade

create a new form and enable AJAX
see how progress type and effect dropdowns are empty

test the webform: on submit, you will get a JS error in the browser console and form will "disappear" form page

Proposed resolution

Use the general default values / do not allow empty values for progress type and effect settings.

Remaining tasks

Provide a patch

🐛 Bug report
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

🇷🇴Romania reszli Târgu Mureș

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

Comments & Activities

  • Issue created by @reszli
  • 🇷🇴Romania reszli Târgu Mureș

    the error turns out to be an issue only when webform.config.yml is not imported (so I guess it could not fall back to the defaults)

    still, IMHO it would be cleaner to take over default values on form creation instead of showing empty options

  • Status changed to Closed: won't fix about 1 year ago
  • 🇺🇸United States jrockowitz Brooklyn, NY

    the error turns out to be an issue only when webform.config.yml is not imported (so I guess it could not fall back to the defaults)

    Using drush webform:repair should fix this.

Production build 0.71.5 2024