On thumbnail browser page /admin/content/file none of operations work. After selecting one picture and hit delete I get no change except url changes to /admin/content/file/delete-multiple/1214. Tha same goes to edit - /admin/content/file/edit-multiple/1214. I get no error message and no error in chrome console.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dmducc’s picture

Yes. THIS is SOOOO frustrating

marcusx’s picture

Title: operations not working » operations not working due to renamed autoload functions in media
Assigned: Unassigned » marcusx

Same issue here.

I debugged this a bit. I asume you are on the latest dev of media. The reason why this is not working anymore is that the bulk functionality has been moved into a submodule here: #2143469: Spin-off bulk file upload support in dedicated module / project

Commit:
http://drupalcode.org/project/media.git/commit/81640ea480a4d19433523c525...

So the hook_menu() implemetations are not correct any more.

e.g.:

  // Expose further "Mutliple" actions.
  if (module_exists('multiform')) {
    // Following approach comes from the media module.
    // @todo Investigate passing file IDs in query string rather than a menu
    // argument and then deprecate media_multi_load().
    $items['admin/content/file/delete-multiple/%media_multi'] = array(
      'title' => 'Delete multiple files',
      'page callback' => 'drupal_get_form',
      'page arguments' => array('file_entity_multiple_delete_confirm', 4),
      'access callback' => TRUE,
      'access arguments' => array('delete', 4),
      'file' => 'file_entity.admin.inc',
      'file path' => drupal_get_path('module', 'file_entity'),
    );
  }

Needs now to be:

  // Expose further "Mutliple" actions.
  if (module_exists('multiform')) {
    // Following approach comes from the media module.
    // @todo Investigate passing file IDs in query string rather than a menu
    // argument and then deprecate media_multi_load().
    $items['admin/content/file/delete-multiple/%media_bulk_upload_multi'] = array(  // PATH HAS CHANGED HERE
      'title' => 'Delete multiple files',
      'page callback' => 'drupal_get_form',
      'page arguments' => array('file_entity_multiple_delete_confirm', 4),
      'access callback' => TRUE,
      'access arguments' => array('delete', 4),
      'file' => 'file_entity.admin.inc',
      'file path' => drupal_get_path('module', 'file_entity'),
    );
  }

This needs to be changed on several places. I will fix this today on my current project and send a patch later.

marcusx’s picture

Assigned: marcusx » Unassigned
Status: Active » Needs review
FileSize
923 bytes

Patch attached. There was already a fix for download and edit in the latest dev. I copied this over to the part responsible for deleting.

Attention:
You need to activate the "media_bulk_upload" module which is a submodule from media to make this work. This should normally happen in an hook_update() the code is there but for some reason it was still disabled on my side.

marcusx’s picture

Title: operations not working due to renamed autoload functions in media » Edit, download, delete operations not working with latest media.

Updating title, it is more likely that people search for delete if deleting stuff is not working than for operations. So let's make it a bit clearer what this is about.

  • Commit 61d96d0 on 7.x-3.x authored by marcusx, committed by das-peter:
    Issue #2194047 by marcusx | loparr: Edit, download, delete operations...
das-peter’s picture

Status: Needs review » Fixed

Thanks :)

Status: Fixed » Closed (fixed)

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