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.
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'].
Comment | File | Size | Author |
---|---|---|---|
#5 | media_gallery-show-remove-checkbox-1391928-5.patch | 740 bytes | Moloc |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein commentedThere 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.)
Comment #2
workonwomen CreditAttribution: workonwomen commentedI 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...
Comment #3
lsolesen CreditAttribution: lsolesen commented@Moloc Did you ever find a solution to this one?
Comment #4
Thundermoth CreditAttribution: Thundermoth commented@ molloc
Thank you.
changed line 982 to:
$form['remove'] = array(
Issue "solved".
Comment #5
Moloc CreditAttribution: Moloc commentedAs 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.
Comment #6
lsolesen CreditAttribution: lsolesen commentedTagging.
Comment #7
lsolesen CreditAttribution: lsolesen commentedRetagging.
Comment #8
Moloc CreditAttribution: Moloc commentedPatch commited: http://drupalcode.org/project/media_gallery.git/commit/9cbcf690da5fef238...