Posted by acbramley on November 7, 2012 at 2:07am
2 followers
| Project: | Media |
| Version: | 7.x-2.0-unstable6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
This issue appears on both 7.x-2.0-unstable6 and 7.x-2.x-dev. An image field with cardinality 1 has a broken display, I'm using the Rubik theme, but I think this is an issue with the rendering of it as the markup seems wrong:
The tag for the "Select media" link is outside the form-item div:
<div class="media-widget form-wrapper mediaBrowserLaunch-processed" id="edit-field-resource-thumbnail-und-0"><div id="edit-field-resource-thumbnail-und-0-title" class="form-item form-type-item">
<label for="edit-field-resource-thumbnail-und-0-title">Resource Thumbnail </label>
</div>
<div class="preview launcher"></div><a href="#" class="button launcher" id="edit-field-resource-thumbnail-und-0-select">Select media</a><a href="/media/0/edit/nojs" class="ctools-use-modal use-ajax ctools-modal-media-file-edit button edit ajax-processed ctools-use-modal-processed" id="edit-field-resource-thumbnail-und-0-edit" style="display: none; ">Edit media</a><a href="#" class="button remove" id="edit-field-resource-thumbnail-und-0-remove" style="display: none; ">Remove media</a><input class="fid" type="hidden" name="field_resource_thumbnail[und][0][fid]" value="0">
</div>Please see attached screenshot (note the correctly displaying widget above with Unlimited Cardinality)
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| media-widget-bug.png | 57.45 KB | Ignored | None | None |
Comments
#1
#2
Still an issue in 7.x-2.0-unstable7. Quick fix is add the 'form-item' CSS class next to the 'media-widget'.
PS: I am also using Rubik for my admin theme.
#3
Patch #2 fixed it for me! Rerolled patch in appropriate format.
#4
Thanks for the re-roll.