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.
In the ctools auto submit javascript, the events 'keyup' and 'change' have had added to them a timeout to avoid 'bounce', which would cause undesirable effects.
In setTimeout() a jQuery proxy is used to store the context (in this case 'this.form') for the function triggerSubmit(). If the 'change' or 'keyup' event is triggered and immediately afterwards the DOM form element is removed, the function triggerSubmit() is called with a copy of the now-removed form, which is submitted to the server.
To avoid this you need to add a check of the context(this) presence in the DOM.
Comment | File | Size | Author |
---|---|---|---|
#1 | ctools-auto-submit_non_existent_form-2275355-1.patch | 643 bytes | artemln |
Comments
Comment #1
artemln CreditAttribution: artemln commentedComment #3
vasi CreditAttribution: vasi at Evolving Web commentedI encountered the same problem, and came to the same conclusion. Patch works for me.
Comment #4
rivimeyTry to clarify issue summary, partly successful.
Comment #5
rivimeyComment #6
rivimeyComment #7
rivimeySorry for multiple summary edits.
The patch is good and applies cleanly to 7.x-1.x.
This code looks good, and looks harmless to me, so despite having only one other 'vote' it would seem sensible to include it.
Comment #8
rivimeyComment #9
japerryGot it, that makes sense. Committed.
Comment #11
MustangGB CreditAttribution: MustangGB commentedWouldn't mind if the JS people could give a bit of love to the other autosubmit issue over at #1708438: Incompatibility Between Chaos Tools Auto Submit and Autocomplete Fields!.