I am trying to replace the default IB view with my own to allow for easier browsing by gallery name or taxonomy. I created a view that returns both File Path and File ID and set its Row Style to "Image Browser thumbnails". The result is a list of empty images, looks like the path to them does not exist. It is strange because I compared the output (path and ID) of both my and the default view and they return identical results (when the style is set to HTML List). For some reason Image Browse does not recognize my view though. One difference in my view's output is that the tooltip on the empty thumbnail does not show a File ID.
Below is the export of my view and I have attached a screenshot as well.

$view = new view;
$view->name = 'ib_imagefield';
$view->description = '';
$view->tag = 'Image Browser';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'field_gal_images_fid' => array(
    'label' => 'File Rel',
    'required' => 1,
    'delta' => '-1',
    'id' => 'field_gal_images_fid',
    'table' => 'node_data_field_gal_images',
    'field' => 'field_gal_images_fid',
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'filepath' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_file' => 0,
    'exclude' => 0,
    'id' => 'filepath',
    'table' => 'files',
    'field' => 'filepath',
    'relationship' => 'field_gal_images_fid',
  ),
  'fid' => array(
    'label' => 'File ID',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_file' => 0,
    'exclude' => 0,
    'id' => 'fid',
    'table' => 'files',
    'field' => 'fid',
    'relationship' => 'field_gal_images_fid',
  ),
));
$handler->override_option('sorts', array(
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'gallery' => 'gallery',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 15);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
  'grouping' => '',
  'type' => 'ul',
));
$handler->override_option('row_plugin', 'imagebrowser_thumbnail');
CommentFileSizeAuthor
view.jpg59.22 KBkirilius
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kirilius’s picture

Any help please?

webdrips’s picture

Kirilius, seems you are close but not quite there.

If you haven't already, think about installing Devel. Then in your view, click the Theme: information link and then the Display output link. Copy that entire output on the screen to a local file in your theme directory and add the PHP statement dsm($view) to the top of the page and re-scan the template files using the button in the view or clear your cache.

You should be able to gather enough information from the $view variable to help you de-bug what's going on. If not, you can take to the next level down in the template files and repeat the process. Each template file provides a list of variables that may be pretty-printed using dsm($variable_name);