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.
Hi,
To replicate, add an image field and a file field to a content type. Screenshot attached of the issue. Both of my fields allow unlimited values.
The files field appears correct to me - full width and the upload button correctly aligned at the end.
The images field is not as wide and the button is underneath the upload.
Most noticeable when the two fields are next to each other like on the screenshot. The markup seems different between the Image and File field widget, and I was unable to come up with a quick CSS fix.
Screenshot attached.
Kind regards,
Ben
Comment | File | Size | Author |
---|---|---|---|
#4 | image_widget.func_.txt | 1.04 KB | sja1 |
#3 | bootstrap file upload problem.PNG | 8.41 KB | sja1 |
bootstrap-files-images.png | 42.03 KB | bkno |
Comments
Comment #1
bkno CreditAttribution: bkno commentedComment #2
markhalliwellAs this technically works, albeit doesn't look all that great, I have to demote the priority on this issue.
Comment #3
sja1 CreditAttribution: sja1 commentedI'm having the same problem, and mine looks slightly worse still.
Comment #4
sja1 CreditAttribution: sja1 commentedI have a possible solution to the problem. Here are the steps:
What the attached file does is to override the core function that themes image upload fields: "theme_image_widget"
File fields render correctly because the bootstrap theme already has an override for its corresponding theme function: "theme_file_managed_file". That override exists at /bootstrap/theme/file/file-managed-file.func.php
Hope this helps!
Comment #5
sja1 CreditAttribution: sja1 commentedChanging status to "Needs review"
Comment #6
bverc CreditAttribution: bverc commentedSince this bug was posted it has been fixed in the 3.x-dev branch (post beta2).
See: https://www.drupal.org/node/2327495