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.
Follow-up to #2861165: Not properly closing div on bootstrap_image_widget template function
Something went wrong with this change... the UI looks broken now.
Comment | File | Size | Author |
---|---|---|---|
#9 | not_properly_closing-2870204-9.patch | 7.17 KB | markhalliwell |
Comments
Comment #2
fmfpereira CreditAttribution: fmfpereira as a volunteer and commentedWeird! If you use older version does it work ok?
I will try to inspect if there are other preprocess functions . Last version was indeed closing the div on the wrong #suffix element.
Comment #3
hass CreditAttribution: hass commentedWhile we are on the image upload widget... the drag and drop icon is incorrectly shown. On the right side it id half hidden.
Comment #4
hass CreditAttribution: hass commentedComment #5
hass CreditAttribution: hass commentedI'm sure the upload form was correctly shown in 3.12...
Comment #6
markhalliwellIt is broken. I shouldn't have committed the patch in #2861165: Not properly closing div on bootstrap_image_widget template function.
I think the reason that issue was created (and why I committed it) is because the markup does look "wrong" at first glance.
It's actually wasn't.
There wasn't really a way to effectively "wrap" an input group div around both
upload
andupload_button
since they're sibling child elements of the managed file element.So yes, the closing
</div>
should be onupload_button
, not as a suffix onupload
.---
That being said, I'd really like to avoid custom markup like this because it's easy to make mistakes like this.
I'll commit a fix shortly that converts this into using the proper
#input_group_button
property.Comment #8
markhalliwellAs a side note, in case you missed the above related issue:
#2870289: file_ajax_upload() causes malformed Drupal.settings
While this is the proper way to fix this issue, it does come with a slight annoyance. If the upload button is clicked without a file actually provided, it will inadvertently cause a JS fatal error due to the above core bug. The patch in that issue fixes it.
Comment #9
markhalliwellHere's a patch, just in case.
Comment #10
hass CreditAttribution: hass commentedThanks. That fixes the issue in the theme.
Comment #11
fmfpereira CreditAttribution: fmfpereira as a volunteer and commentedThank you, it also solves the initial issue #2861165: Not properly closing div on bootstrap_image_widget template function that was triggering other form fields to be wrapped in the image field.
My patch solved this issue but generated other problems that i was not ware. Sorry for the mess.
Comment #13
joseph.olstadFor some reason my make file responds with:
Unable to patch bootstrap with not_properly_closing-2870204-9.patch
Comment #14
joseph.olstadfor make files, try this patch instead
Comment #15
joseph.olstadrats that one didn't work either.
Comment #16
joseph.olstadnevermind, 3.14 already has this, PEBKAC issue