Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.5
Component:
node data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 May 2009 at 15:51 UTC
Updated:
23 Jun 2009 at 01:12 UTC
Hi,
I use the User Relationship + Content Profile Modules.
The UR Module creates a default view 'user_relationships_browser' and it works fine. ( it shows the relations between requester and requestee )
when i create a relation in views with 'Node:Content-Profile' ( i need the Userpicture and some CCK Fields ) there is NO output from views.
( i create ONLY a relation )
in Views 6.x-2.2 it works !! is it a bug ?
Comments
Comment #1
dawehnercould you please export the view?
i guess this could be a bug of content-profile
Comment #2
HamsterTrainer commentedHi,
This view works in 6.x-2.2 but dont in 6.x-2.5
$view = new view;
$view->name = 'cc_user_relationships_browser';
$view->description = 'Zeigt das Netzwerk im Kontrollcenter';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'user_relationships';
$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(
'requestee_id' => array(
'label' => 'requestee',
'required' => 0,
'id' => 'requestee_id',
'table' => 'user_relationships',
'field' => 'requestee_id',
'relationship' => 'none',
),
'requester_id' => array(
'label' => 'requester',
'required' => 0,
'id' => 'requester_id',
'table' => 'user_relationships',
'field' => 'requester_id',
'relationship' => 'none',
),
'rtid' => array(
'label' => 'rtid',
'required' => 0,
'id' => 'rtid',
'table' => 'user_relationships',
'field' => 'rtid',
'relationship' => 'none',
),
'content_profile_rel' => array(
'label' => 'Content Profile',
'required' => 0,
'type' => 'profile',
'id' => 'content_profile_rel',
'table' => 'users',
'field' => 'content_profile_rel',
'relationship' => 'requestee_id',
),
'field_picture_fid' => array(
'id' => 'field_picture_fid',
'table' => 'node_data_field_picture',
'field' => 'field_picture_fid',
'relationship' => 'content_profile_rel',
),
));
$handler->override_option('fields', array(
'name' => array(
'label' => '',
'link_to_user' => 1,
'exclude' => 0,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'relationship' => 'requestee_id',
'override' => array(
'button' => 'Override',
),
),
'field_picture_fid' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'custom',
'format' => 'imagefield__lightbox2__ProfileFriends__original',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_picture_fid',
'table' => 'node_data_field_picture',
'field' => 'field_picture_fid',
'relationship' => 'content_profile_rel',
),
));
$handler->override_option('sorts', array(
'plural_name' => array(
'order' => 'ASC',
'id' => 'plural_name',
'table' => 'user_relationship_types',
'field' => 'plural_name',
'relationship' => 'rtid',
),
));
$handler->override_option('arguments', array(
'requester_id' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'Alle',
'title' => '',
'default_argument_type' => 'php',
'default_argument' => '',
'validate_type' => 'numeric',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'requester_id',
'table' => 'user_relationships',
'field' => 'requester_id',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => 'global $user;
if($user->uid > 0)
{
return $user->uid;
}
else
{
return NULL;
}',
'validate_argument_node_type' => array(
'blog' => 0,
'poll' => 0,
'forum' => 0,
'panel' => 0,
'anzeige' => 0,
'page' => 0,
'profile' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'4' => 0,
'2' => 0,
'3' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'approved' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'approved',
'table' => 'user_relationships',
'field' => 'approved',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'Beziehungen');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_pager', 'mini');
$handler->override_option('row_options', array(
'inline' => array(
'name_1' => 'name_1',
),
'separator' => ', ',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'relationships/%');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'All Relationships',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
$handler = $view->new_display('block', 'Block by type', 'block_1');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('block_description', 'Display user\'s relationships grouped by relationship type');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('block', 'Block by user', 'block_2');
$handler->override_option('fields', array(
'plural_name' => array(
'label' => '',
'exclude' => 1,
'id' => 'plural_name',
'table' => 'user_relationship_types',
'field' => 'plural_name',
'relationship' => 'rtid',
'override' => array(
'button' => 'Override',
),
),
'name' => array(
'label' => '',
'link_to_user' => 1,
'exclude' => 1,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'relationship' => 'requestee_id',
'override' => array(
'button' => 'Use default',
),
),
'updated_at' => array(
'label' => 'Added',
'date_format' => 'time ago',
'custom_date_format' => '',
'exclude' => 1,
'id' => 'updated_at',
'table' => 'user_relationships',
'field' => 'updated_at',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
'name_1' => array(
'label' => '',
'exclude' => 0,
'id' => 'name_1',
'table' => 'user_relationship_types',
'field' => 'name',
'relationship' => 'rtid',
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('title', 'Related users');
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => 'name',
'type' => 'ul',
));
$handler->override_option('row_options', array(
'inline' => array(),
'separator' => '',
));
$handler->override_option('block_description', 'Display user\'s relationships grouped by user');
$handler->override_option('block_caching', -1);
Comment #3
merlinofchaos commentedThis is a dup but I don't have the nid handy.
Comment #4
brad mering commentedI know I'm coming a bit late to the party but this is solved in http://drupal.org/node/433290. I had a nearly identical problem upon upgrading from 2.3 to 2.6. After a bit of hunting I discovered that it appears to be a bug in beta3 of the content profile. Version 6.x-1.0-beta4 of content profile fixed the problem nicely. It doesn't appear to be a bug in views, but rather was just revealed by the patch in item #386986, part of the 2.4 views update.
I think that we can close this item, as its neither a views bug nor is still an active problem. I'm going to close it. I'm a long time drupal user, though fairly new to posting on the site. If this isn't the right protocol, please let me know.
On a related editorial note, VIEWS IS THE BEST!!!