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.
hass created an issue. See original summary.
Weird! 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.
While we are on the image upload widget... the drag and drop icon is incorrectly shown. On the right side it id half hidden.
I'm sure the upload form was correctly shown in 3.12...
It 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 and upload_button since they're sibling child elements of the managed file element.
So yes, the closing </div> should be on upload_button, not as a suffix on upload.
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.
Issue #2870204 by hass, markcarver: Not properly closing div on...
As 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.
Here's a patch, just in case.
Thanks. That fixes the issue in the theme.
Thank 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.
Drupal is a registered trademark of Dries Buytaert.