As discussed on IRC with @rootatwc.

When using the latest devs of media-2.x and file_entity-2.x-dev. When I go to admin/content/file/thumbnails the view say's "No content available".
When I go to admin/content/file I see all my files listed, but without the icon.

If I revert back to the File Entity module-2.x from Wed, 6 Feb 2013 - 538e483e9358e48fe8b4d992334c4246c6264170 commit, everything starts working again.

Let me know if you need anymore information.

Hope that helps

Comments

devin carlson’s picture

Project: File Entity (fieldable files) » D7 Media
Component: Views integration » Code
Assigned: Unassigned » devin carlson
Category: bug » task
Status: Active » Needs review
StatusFileSize
new3.46 KB

Media requires a few small updates to accommodate the latest changes made to File entity.

Not sure how I missed this though (and haven't received any bug reports from our editoral staff). :S

gmclelland’s picture

StatusFileSize
new200.46 KB

Thank you, that patch seems to make it work with the latestest file_entity dev.

Question: admin/content/file doesn't seem to show icons next to the filenames anymore. Is that intentional? I don't think they are really needed, but I just noticed the difference from a previous version of file_entity.

See attachment for details.

gioppy’s picture

Hi,
I've a same problem, but with the patch in #1, in the page admin/content/file/thumbnails I've the same view of the admin/content/file. If you want to have the thumbnails views in this page you can modifiy the media.module in this way:

/**
 * Implements hook_form_FORM_ID_alter().
 *
 * This alter enhances the default admin/content/file page, addding JS and CSS.
 * It also makes modifications to the thumbnail view by replacing the existing
 * checkboxes and table with thumbnails.
 */
function media_form_file_entity_admin_files_alter(&$form, $form_state) {
  if (!empty($form_state['values']['operation'])) {
    // The form is being rebuilt because an operation requiring confirmation
    // We don't want to be messing with it in this case.
    return;
  }

  // Add the "Add file" local action, and notify users if they have files
  // selected and they try to switch between the "Thumbnail" and "List" local
  // tasks.
  $path = drupal_get_path('module', 'media');
  require_once $path . '/includes/media.browser.inc';
  $form['#attributes']['class'][] = 'file-entity-admin-files-form';
  $form['#attached']['js'][] = $path . '/js/media.admin.js';
  $form['#attached']['css'][] = $path . '/css/media.css';
  media_attach_browser_js($form);

  // By default, this form contains a table select element called "files". For
  // the 'thumbnails' tab, Media generates a thumbnail for each file and
  // replaces the tableselect with a grid of thumbnails.
  if (arg(3) == 'thumbnails') {
    if (empty($form['files']['#options'])) {
      // Display empty text if there are no files.
      $form['files'] = array(
        '#markup' => '<p>' . $form['files']['#empty'] . '</p>',
      );
    }
    else {
      $files = file_load_multiple(array_keys($form['files']['#options']));

      $form['files'] = array(
        '#tree' => TRUE,
        '#prefix' => '<div class="media-display-thumbnails media-clear clearfix"><ul id="media-browser-library-list" class="media-list-thumbnails">',
        '#suffix' => '</ul></div>',
      );

      foreach ($files as $file) {
        $preview = media_get_thumbnail_preview($file, TRUE);
        $form['files'][$file->fid] = array(
          '#type' => 'checkbox',
          '#title' => '',
          '#prefix' => '<li>' . drupal_render($preview),
          '#suffix' => '</li>',
        );
      }
    }
  }
}

This seems to restore the original thumbnails views, though there is a little problem with operation in file (ex. mass delete).
:)

samwillc’s picture

I have the same issue. Using:

File entity: 7.x-2.0-unstable7+37-dev
Media: 7.x-2.0-unstable7+25-dev

admin/content/file - lists my images
admin/content/file/thumbnails - 'No files available' message.

Has this patch been added to the newest dev version of the Media 2x module?

Sam.

gmclelland’s picture

@samwillc - not yet, does the patch fix the problem for you?

ParisLiakos’s picture

Status: Needs review » Fixed

patch fixes it indeed
committed/pushed
http://drupalcode.org/project/media.git/commit/69e9d2e
thanks Devin

samwillc’s picture

@gmclelland, I asked a few months ago about how to actually apply these patches but had no response! I am more than happy to test these things but not going about it blind.

I can see the page of code in the link with a bunch of '+' and '-' signs on the left hand side. I presume these are lines that change or stay the same, that you don't manually crack open the media.module file and find and replace things using notepad!

It looks automated with the git commands like this

diff --git a/media.module b/media.module

In the past, for simple patches and testing I have literally just opened the module file and changed it by hand, but this looks more detailed. How do I go about applying this to test? Although someone else has already tested, I could do with knowing how to do this like everyone else seems to know. Thanks.

Sam.

ParisLiakos’s picture

@samwillc see http://drupal.org/project/media/git-instructions under Applying a patch
i committed this patch though yesterday, so if you download the latest dev it is in there

samwillc’s picture

Thanks for the link. I will have to look into how to set up git on my computer, I presume this is the right place to look:

http://git-scm.com/documentation

My version does not include the patch and thumbnails do not show, so I will try patching the module rather than downloading the newest version just so I can learn how to do it.

Sam.

ParisLiakos’s picture

sam, i think its better to follow documentation here http://drupal.org/node/1013552

samwillc’s picture

Ah, I see. Bookmarked and ready to read through when I get a spare second.

Thanks for the help.

Sam.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Added link to the commit