Hey there. I've got a view that takes a text field (a YouTube URL) and builds an embedded video widget for use in a block display, using it as a basis. The view rewrites the field_youtubevideo field to emit this properly.

However, the view emits no HTML whatsoever. I've done some fairly extensive experimentation to try to figure out the problem. It's not the field token and I don't think it has anything to do with rewriting, for a few reasons:

  • When the entire contents of the field rewriting field is the [field_youtubevideo_value] token corresponding to that text field, it displays correctly.
  • I replaced the rewritten output with one that did not use [field_youtubevideo_value] at all; it still didn't display an object embedding.
  • When I use Contemplate to put the same output in as the node teaser, and view the node teaser on a regular page (the frontpage, not having anything to do with views), the object appears as normal.
  • When I attempt to include that node's teaser in place of the rewritten output within the view, it likewise does not display the object.

I would downgrade to Views 2.4, but doing so would jeopardize my work and I don't have an active play-around site to troubleshoot this on.

The view is below. As the SQL query clearly works fine, I have not included it.

Thanks,
Ed

$view = new view;
$view->name = 'slatestate_video_flagbox';
$view->description = 'This view displays the most recent Video Content node, without any title or description fixings.';
$view->tag = '';
$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('fields', array(
  'field_youtubevideo_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 1,
      'text' => '<object width="320" height="265"><param name="movie" value="[field_youtubevideo_value]&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="[field_youtubevideo_value]&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object>',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_youtubevideo_value',
    'table' => 'node_data_field_youtubevideo',
    'field' => 'field_youtubevideo_value',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('sorts', array(
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'video' => 'video',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 1);
$handler->override_option('row_options', array(
  'inline' => array(),
  'separator' => '',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);

Comments

merlinofchaos’s picture

Status: Active » Closed (works as designed)

object tags are stripped out via filter_xss_admin() -- if you need object tags, you will need to add them at a lower level, i.e, the theming layer.