'group multiple values' of node reference field creates error in table & list views

benma - January 4, 2008 - 07:26
Project:Content Construction Kit (CCK)
Version:5.x-1.6-1
Component:Views Integration
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I created a table view (http://gcr.marzeion.info/media) that has a node reference field in the last column (Hvem). There are multiple values in the node reference field for some of the nodes, and they should all be shown in the table view. If I select as a handler 'do not group multiple values', the table view looks ok and produces no errors, but only one of the multiple node references is shown. If however I select 'group multiple values', I get the error messages you can see under the link above, and no entries are shown in the table view.
This is also the case if I define a list view instead. However, if I create a date browser view, I get no error messages, and all the node references are shown.

Any help would be greatly appreciated!

Cheers,
Ben.

#1

foo - January 14, 2008 - 03:59

Yeah, I get the same error (but with my field names). I'm rebuilding my band's list of performances, and I've made the other performers at each show node references. I've tried lots of combinations for the table view, but only "Do not group multiple values" works, which sucks, because it then lists things multiple times.

Maybe the SQL is bad? I'm not awake enough to delve further at the moment...

#2

merlinofchaos - January 14, 2008 - 04:48
Project:Views» Content Construction Kit (CCK)
Version:5.x-1.6» 5.x-1.6-1
Component:Code» Views Integration

This sounds like it's specific to nodereference, which means it's CCK's issue.

#3

foo - January 19, 2008 - 16:54

#4

foo - January 19, 2008 - 16:53

Anyone know where I should start looking to see where the problem might be?

#5

rbl - January 23, 2008 - 08:52

Same here... Going nuts!

#6

benma - January 23, 2008 - 12:53

Just an explanation: I changed the setting for the view I link to above from 'group multiple values' to 'do not group multiple values', to remove the error messages (the site is in semi use...).

So if you follow the link in the first post, you won't get the error messages, but the problem is still there.

Cheers,
Ben.

#7

cyberpunk - January 24, 2008 - 17:51

I've got the same issue, any progress with it?

#8

foo - January 28, 2008 - 03:00

Doesn't look like anybody's picked up the bug yet...

#9

cyberpunk - January 28, 2008 - 15:00

I think i fixed this bug by patching content_views.inc on line 153:
Before:

$result = db_query(db_rewrite_sql($query, 'node'));

After:
$result = db_query($query);

This modification fixed this bug on the site i'm working on, but i don't tested it on other sites and i can't guarantee that this modifications will not broke anything.

#10

foo - February 2, 2008 - 03:34

cyberpunk - that fixes it for me too. It's definitely a bug in the SQL formation, or the db_rewrite_sql function.

#11

jt_jones - February 6, 2008 - 22:11

subscribe

#12

tatien - February 25, 2008 - 20:15

I had the same problem, however it was hard to find because I couldn't find the original SQL error in the issue. Here is the error I had:

SELECT node_data_field_projet.field_projet_nid AS DISTINCT(node.nid) FROM node node LEFT JOIN content_field_projet node_data_field_projet ON node.vid = node_data_field_projet.vid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'content_access_rid') OR (na.gid = 1 AND na.realm = 'workflow_access') OR (na.gid = 0 AND na.realm = 'workflow_access_owner'))) AND ( node.nid = 206 ) ORDER BY node_data_field_projet.delta

 
 

Drupal is a registered trademark of Dries Buytaert.