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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acbramley’s picture

Title: Broken display for file fields with media selector and cardinality of 1 » Broken display for image fields with media selector and cardinality of 1
Bill Choy’s picture

FileSize
377 bytes

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.

acbramley’s picture

Status: Active » Needs review
FileSize
365 bytes

Patch #2 fixed it for me! Rerolled patch in appropriate format.

Bill Choy’s picture

Thanks for the re-roll.

hefox’s picture

Title: Broken display for image fields with media selector and cardinality of 1 » Broken display for fields with media selector and cardinality of 1
Status: Needs review » Reviewed & tested by the community

I'm having the issue with both image and file fields, and patch fixes it

aaron’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

image field