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.
The bootstrap_image_widget function is not properly closing upload div element when there are no uploaded files, creating errors in the DOM.
else {
$element['upload']['#prefix'] = '<div class="input-group">';
$element['upload_button']['#prefix'] = '<span class="input-group-btn">';
$element['upload_button']['#suffix'] = '</span></div>';
}
Comment | File | Size | Author |
---|---|---|---|
#2 | closing-div-upload-element-image-widget-2861165-2.patch | 650 bytes | fmfpereira |
Comments
Comment #2
fmfpereira CreditAttribution: fmfpereira as a volunteer commentedMoved closing div on $element['upload_button']['#suffix'] to $element['upload']['#suffix'].
Comment #3
fmfpereira CreditAttribution: fmfpereira as a volunteer commentedComment #5
markhalliwellComment #7
hass CreditAttribution: hass commentedThis may introduced a new issue, see #2870204: Not properly closing div on bootstrap_image_widget template function.