When I use a file relationship or a view based on a file vs a node with the views_timelinejs module I cannot select file:render as a media type or file: upload as a date type.

Even if I use other values, I see the following errors because I am using file fields:

Warning: strlen() expects parameter 1 to be string, array given in drupal_validate_utf8() (line 1616 of drupal/includes/bootstrap.inc).
Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1582 of drupal/includes/bootstrap.inc).

Comments

SocialNicheGuru’s picture

Title: Support File_Entity, File:Render as media type, File:Upload as a date type » File_entity relationship error in view: strlen() expects parameter 1 to be string, array given in drupal_validate_utf8, check_plain
Project: Views TimelineJS integration » Views (for Drupal 7)
Version: 7.x-1.x-dev » 7.x-3.x-dev

Warning: strlen() expects parameter 1 to be string, array given in drupal_validate_utf8() (line 1618 of drupal7/includes/bootstrap.inc).
Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1582 of drupal7/includes/bootstrap.inc).

I create a view with a field relationship to a field pointing to a file: Content:field-in-file:fid aka field_field-in-file attached to a content type
I add the title of the field: (field_field-in-file)File:Title to the fields section
I get the errors above in views_timelinejs

If I switch to a regular title field, everything is ok.

The views handlers called to deal with the title field:

$plugin = array(
  'name' => t('Title field for TimelineJS'),
  'handler_name' => 'views_handler_field_node',
  'field_type' => 'title',
);

 * @file
 * Title field integration as a text source for TimelineJS.
 */

$plugin = array(
  'name' => t('Title field based on Field API for timelineJS field'),
  'handler_name' => 'views_handler_title_field',
  'field_type' => 'text',
);