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.
Some themes override the submit <input>
and renders a <button>
instead. Such as Bootstrap theme.
This results in the JavaScript alert to appear even when hitting submit or preview.
Comment | File | Size | Author |
---|---|---|---|
#1 | warning_appears_when_clicking_submit_some_themes-2262093-1.patch | 510 bytes | Mohammed J. Razem |
Comments
Comment #1
Mohammed J. RazemThis due to a the selector being specific to
<input>
.The patch attached adds
<button>
to the selector, as form submit actions can either be<input>
or<button>
.Comment #2
Adrian Richardson CreditAttribution: Adrian Richardson commentedThis patch fixes the issue for me. Tested OK using the Bootstrap and Shiny themes.
Comment #3
mkhamash CreditAttribution: mkhamash commentedSolved the problem with bootstrap theme.
Comment #4
NWOM CreditAttribution: NWOM commentedThis fix is included in another patch. Marking as duplicate #2302683: Context is not used in the js behaviors
Comment #5
COBadger CreditAttribution: COBadger as a volunteer commentedReopening, as the patch in Context is not used in the js behaviors does not fix this problem for us.
The problem we're experiencing is that in a bootstrap subtheme, users clicking on the "save" button on a node/edit form are shown the popup warning.
The patch in https://www.drupal.org/node/2262093#comment-8758301 does solve the problem we're experiencing.
Comment #7
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commentedCommitted, thanks!