Running 7.x-2.0-alpha4+25-dev (2015-Feb-11). The submit button does nothing. It doesn't insert the selected image into the document.

Comments

yutia’s picture

Priority: Normal » Major

Seeing the same issue. it also redirects to homepage.

Here are some additional information :
I have jquery Update set to 1.7 because of the nivoslider.

I get javascript error loading up a media page;
TypeError: $(...).once is not a function @ /media_gallery/media_gallery.dragdrop.js line 7
var $collection = $('.media-gallery-collection', context).once('media-gallery-sortable');

Not sure if the issue that I'm having associated with this, but media browser is not opening up as popup even though /media/browser?render=media-popup shows

candelas’s picture

I have the same problem and I realize that if I click on the label, the image gets selected, but if I click in the a element that surrounds the image, there must be a JavaScript prevent default that makes that it is not selected. I also, with Firebugs, deleted the a element and then I could select the image.

<li class="" id="media-item-160">
          <div data-fid="160" class="media-item" title="lopez-legentil.jpg"><div class="media-thumbnail"><a href="/marsymbiomics/files/lopez-legentiljpg"><img alt="" src="xxx/sites/default/files/styles/panopoly_image_thumbnail/public/pictures/image.jpg?itok=XptUdm3c" class="panopoly-image-thumbnail"></a><div class="label-wrapper"><label class="media-filename">image.jpg</label></div></div></div>        </li>

//should be

<li class="" id="media-item-160">
          <div data-fid="160" class="media-item" title="lopez-legentil.jpg"><div class="media-thumbnail"><img alt="" src="xxx/sites/default/files/styles/panopoly_image_thumbnail/public/pictures/image.jpg?itok=XptUdm3c" class="panopoly-image-thumbnail"><div class="label-wrapper"><label class="media-filename">image.jpg</label></div></div></div>        </li>

candelas’s picture

Title: Submit button does not insert image into document » Submit button does not insert image into document because of a element
candelas’s picture

I don't know enough to make a patch for this problem, but while it is resolved, I modified the media-views-view-media-browser.tpl.php changing

print $row->preview;

to

print preg_replace('/<\\/?a(\\s+.*?>|>)/', "", $row->preview);

to remove the a element and it works.

Chris Matthews’s picture

Version: 7.x-2.0-alpha4 » 7.x-2.x-dev
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team