Removing media from the detail-edit/multiedit form is not possible, because the "Remove from gallery"-checkbox is not visible/rendered.

The Problem lies in line 982 of media_gallery.module. If the array is assigned to $form['remove'] instead of $form['preview']['remove'], the checkbox is added in the view.

 980   // Put the remove checkbox inside the "preview" section, so it shows up
 981   // underneath the thumbnail.
 982   $form['preview']['remove'] = array(
 983     '#type' => 'checkbox',
 984     '#title' => t('Remove from gallery'),
 985     '#description' => t('The original file remains in your <a href="@library">media library</a>.', array('@library' => url('admin/content/media'))),
 986   );

$form['preview'] is rendered, but not $form['preview']['remove'].

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David_Rothstein’s picture

There have been issues that sound a lot like this one in the past (see for example #1255184: Remove link not appearing). As far as I know they're all resolved if #1055986: Add a preview sidebar to the media edit screen gets committed to the Media module. Do we know if that's the case here? (I haven't checked recently.)

That said, that patch has been sitting in the Media module queue for a while. So maybe it's getting time to consider fixing this in Media Gallery directly. (Would be great to fix it in Media though, since that does preserve the desired user experience.)

workonwomen’s picture

I have also my doubts that the remove or the delete works...
As administrator I am able to remove one-by one the pictures and then the media also allows to delete these pictures...
The users can not remove as they do not have any form for this.
On the bottom of the multiedit there is a form which I was not able to figure out how it works as it will just complain that that teh picture is in use...

lsolesen’s picture

@Moloc Did you ever find a solution to this one?

Thundermoth’s picture

@ molloc
Thank you.
changed line 982 to:

$form['remove'] = array(

Issue "solved".

Moloc’s picture

Status: Active » Needs review
FileSize
740 bytes

As mentioned in #1, the media issue would solve the problem. But as it is still not committed, i created a patch for media_gallery. If the patch in #1 get committed, we need to undo the patch.

lsolesen’s picture

Tagging.

lsolesen’s picture

Issue tags: +Beta8-blockers

Retagging.

Moloc’s picture

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