User view as select list for CCK field adding "Name" field

mziegmann - July 13, 2009 - 14:21
Project:Content Construction Kit (CCK)
Version:6.x-2.x-dev
Component:Views Integration
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

This is a site for a church, and I'm using views to create a page of sermons. Within the CCK "Sermons", I have a nodereference field by which to select the preacher. Preachers are a set of users, filtered by a profile field "Staff Type". I created a view "Preachers", filtered by the Staff Type, and for fields have selected only the profile field "Full Name" to show. I then use this view for the select list of Preachers in in the CCK "Sermons".

In my CCK edit screen (see NodeEditScreen.png), you can see the "Preachers" view shows the full name, but adds "Name: [username]" after each record. I don't know why it's adding this - I don't have username or name as a display field in the "Preachers" view (see View_Preachers.png). I confirmed this by creating a page view - the only thing that shows is the Full Name field, with no links or "name" field.

This extra "name" field is also seen when used in a view that references the preacher selection from the sermons. This becomes a problem when I try to expose the Preacher list in the Sermons view, where it shows the Full name and the name field, but also shows the coding around it. So each item on the select list looks like this:
<span class="views-field-value"> <span class="field-content">The Reverend Scott Denman</span> </span> - <span class="views-field-name"> <label class="views-label-name"> Name: </label> <span class="field-content"><a href="/users/scottdenman" title="View user profile.">ScottDenman</a></span>
(see View_Sermons.png). This code also shows in the select list to the user if I Expose this filter.

I'd appreciate any help with this.

AttachmentSize
NodeEditScreen.png76.16 KB
View_Preachers.png116.8 KB
View_Sermons.png184.31 KB

#1

merlinofchaos - July 13, 2009 - 15:31
Project:Views» Content Construction Kit (CCK)
Version:6.x-2.5» 6.x-3.x-dev
Component:profile data» Views Integration

This is all CCK integration stuff.

#2

mcneill - July 14, 2009 - 14:32

I ran into the same unwanted "Name: username" issue using the current (non-development) release of CCK (6.x-2.4). I was able to get around the problem by actually adding the unwanted username field (User:Name) to the Fields list for the view and then setting the field property "Exclude from display".

Hope that helps.

#3

markus_petrux - July 22, 2009 - 14:28
Version:6.x-3.x-dev» 6.x-2.x-dev

Not a CCK3 issue.

#4

bravo - November 15, 2009 - 20:41

The work-around suggested in #2 saved my day. I tried a few options before coming down here. Adding a second excluded field for User:Name solved the issue.

Thanks mcneill

 
 

Drupal is a registered trademark of Dries Buytaert.