When I'm using Media Browser Plus with Media-7.x.-2.x versions, title column is empty on your-site.com/admin/content/file/list page. It occures because of usage old template function from Media-7.x-1.x versions:

$options[$media->fid] = array(
        'title' => theme('media_link', array('file' => $media)), //<-- This function was removed
        'folder' => $folder,
        'type' => check_plain($media->filemime),
        'size' => format_size($media->filesize),
        'author' => theme('username', array('account' => $media_user)),
        'timestamp' => format_date($media->timestamp, 'short'),
      );

I propose this solution:

//Support 7.x-1.x versions of Media module
      if (function_exists('theme_media_link')) {
        $title_callback = 'media_link';
      }
      else {
        $title_callback = 'file_entity_file_link';
      }

      $options[$media->fid] = array(
        'title' => theme($title_callback, array('file' => $media)),
        'folder' => $folder,
        'type' => check_plain($media->filemime),
        'size' => format_size($media->filesize),
        'author' => theme('username', array('account' => $media_user)),
        'timestamp' => format_date($media->timestamp, 'short'),
      );

Or even reuqire Media 2 for Medai browser plus 2.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m1r1k’s picture

Title: Empty title column on Media admin list table » Empty title column on Media admin list table - patch
FileSize
849 bytes
corbin’s picture

Moreover, the "media_browser_plus-7.x-2.x-empty-title-column-1054616.patch"

makes the following(s) message(s) :

Uninitialized string offset: 0 in form_process_tableselect() (line 3371 of /.../www/includes/form.inc)

disappear.

korven’s picture

@m1r1k
Your solution worked for me.

I am on Media 7.x-2.0-unstable7+20-dev though. But I did update from Media 1.x, perhaps there are some db inconsistency during the update from Media 1.x -> 2.x

nagy.balint’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.98 KB

On the latest version the list view is empty for me even after this patch.
It turned out that the issue was that the data was mobed under the ['admin'] key in the $form variable. So i altered the above patch to work with that.
Maybe not the best way to solve the problem, but it works for me now.

nagy.balint’s picture

Just noticed that then the "vbo" actions were not working, so here is an updated patch.

salvis’s picture

Status: Needs review » Closed (outdated)