So here's my issue. I am 95% positive that this is a bug and not with my views setup (I am very comfortable with using views and utilizing relationships).
The issue that I am receiving is as follows. I am unable to get a Gmap to display the map and markers when I am trying to output the locations of a referenced node on the referencing node. It works fine when using the Row Style "fields" (I want to handle the output of the marker pop-up within the referenced nodes .tpl file, not constraining myself to fields). But when I try to output this as a row style of "Node" it does not work with Gmap. If I use a different row style of "unformatted" the returned values are what they are suppose to be so I know that this is an issue with Gmap.
Here is my exported view:
$view = new view;
$view->name = 'test';
$view->description = '';
$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('relationships', array(
'field_refcompany_nid' => array(
'id' => 'field_refcompany_nid',
'table' => 'node_data_field_refcompany',
'field' => 'field_refcompany_nid',
),
'field_locations_lid' => array(
'label' => 'Location',
'required' => 0,
'id' => 'field_locations_lid',
'table' => 'node_data_field_locations',
'field' => 'field_locations_lid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'field_refcompany_nid',
),
));
$handler->override_option('fields', array(
'latitude' => array(
'id' => 'latitude',
'table' => 'location',
'field' => 'latitude',
),
'longitude' => array(
'id' => 'longitude',
'table' => 'location',
'field' => 'longitude',
),
));
$handler->override_option('arguments', array(
'nid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'php',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
),
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_user' => 0,
'default_argument_php' => 'if(arg(0) == \'node\' && is_numeric(arg(1))){
return arg(1);
}',
'validate_argument_node_type' => array(
'offer' => 0,
'page' => 0,
'place' => 0,
'simplenews' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
'3' => 0,
'2' => 0,
'4' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_php' => '',
),
));
$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',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('header_format', '3');
$handler->override_option('header_empty', 0);
$handler->override_option('footer_format', '3');
$handler->override_option('footer_empty', 0);
$handler->override_option('use_ajax', TRUE);
$handler->override_option('link_display', 'page_1');
$handler->override_option('distinct', 0);
$handler->override_option('row_plugin', 'node');
$handler->override_option('row_options', array(
'relationship' => 'none',
'build_mode' => 'teaser',
'links' => 1,
'comments' => 0,
));
$handler = $view->new_display('block', 'Map & Directions', 'block_3');
$handler->override_option('relationships', array(
'field_refcompany_nid' => array(
'label' => 'At what locations is this offer accepted?',
'required' => 0,
'delta' => -1,
'id' => 'field_refcompany_nid',
'table' => 'node_data_field_refcompany',
'field' => 'field_refcompany_nid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_locations_lid' => array(
'label' => 'Location',
'required' => 0,
'id' => 'field_locations_lid',
'table' => 'node_data_field_locations',
'field' => 'field_locations_lid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_refcompany_nid',
),
));
$handler->override_option('fields', array(
'latitude' => 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,
'style' => 'dd',
'exclude' => 1,
'id' => 'latitude',
'table' => 'location',
'field' => 'latitude',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_locations_lid',
),
'longitude' => 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,
'style' => 'dd',
'exclude' => 1,
'id' => 'longitude',
'table' => 'location',
'field' => 'longitude',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_locations_lid',
),
'phpcode' => 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,
'value' => ' print_r($view,1); dsm($node); ',
'exclude' => 0,
'id' => 'phpcode',
'table' => 'customfield',
'field' => 'phpcode',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'nid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'php',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
),
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_user' => 0,
'default_argument_php' => 'if(arg(0) == \'node\' && is_numeric(arg(1))){
return arg(1);
}',
'validate_argument_node_type' => array(
'offer' => 0,
'page' => 0,
'place' => 0,
'simplenews' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
'3' => 0,
'2' => 0,
'4' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_php' => '',
),
));
$handler->override_option('use_ajax', FALSE);
$handler->override_option('items_per_page', 100);
$handler->override_option('style_plugin', 'gmap');
$handler->override_option('style_options', array(
'macro' => '[gmap ]',
'datasource' => 'location',
'latfield' => 'latitude',
'lonfield' => 'latitude',
'markers' => 'static',
'markerfield' => 'latitude',
'enablermt' => 0,
'rmtfield' => 'latitude',
'rmtcallback' => '',
'markertype' => 'drupal',
'center_on_nodearg' => 0,
'center_on_nodearg_arg' => 'nid',
'highlight_nodearg' => 0,
'highlight_nodearg_arg' => 'nid',
'highlight_nodearg_color' => '#FF0000',
'tooltipenabled' => 0,
'tooltipfield' => 'latitude',
));
$handler->override_option('row_options', array(
'relationship' => 'field_refcompany_nid',
'build_mode' => 'teaser',
'links' => 0,
'comments' => 0,
));
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
Comments
Comment #1
anzolnet commentedI have the same experience. GMap View doesn't render the location of related nodes. The view works otherwise, it lists the required nodes when the Style changed to unformatted.
Comment #2
rubenlor commentedi have the same problem with d7
in d6 i have this post,
http://groups.drupal.org/node/24522
but in d7 i don´t have relationship with location
Comment #3
avpadernoI am closing this bug report, as it's for a not supported project version. If the bug is reproducible on a supported project version, please re-open this report.