Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have cck fields with multiple values. When I create a view, I select "group multiple values" handler for each cck field in the view. When I look at the executed view as admin, the cck field values are grouped correctly in each column. When I look at the view as any other user, I see the values in each field duplicated dozens of times.
Can someone help me figure out this problem? I've got CCK 5.x-1.4
Thanks!
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedI don't know if CCK has addressed this yet or not, but multiple fields need special handling in order to deal with this problem. I know they're aware of the issue, and I suspect this will be marked duplicate when someone from CCK sees it and knows what to mark it a dup as.
Comment #2
SomebodySysop CreditAttribution: SomebodySysop commentedIn my case at least, I assume I get this problem because I have a customized node_db_rewrite_sql and the "group multiple values" field handler (content_views_field_handler_group) calls db_rewrite_sql. I added one line to this handler, and it seems to have resolved my issue:
Of course, I don't know if this is the best approach, whether it opens me up to other potential problems. Any comments?
If this is a good fix, could it be incorporated into the handler permanently (which is why I changed this issue to a feature request)?
Comment #3
Harry Slaughtersubscribing.
seeing this problem too. we're using 3 ACL modules. i'm wondering if ACL modules and the subsequent db_rewrite_sql that takes place is causing this.
Comment #4
Niel Jackob CreditAttribution: Niel Jackob commentedSame problem, thanks for your solution. Now it is working.
Comment #5
derhasi CreditAttribution: derhasi commentedI have the same problem. In my case it appears when using nodeaccess oder content_access (ACL activated too). besides i use taxonomy_access. but that did not cause the problem.
Your array_unique works around the problem. I guess it is caused by some node_access restriction, forced by the above modules- but I cannot pinpoint it. I recognized some difference in the MySQL-query for the users, caused by
content_views_field_handler_group
, so perhaps it could help you:Field_runden is a computed field with multiple values.
Comment #6
yched CreditAttribution: yched commentedfixed in latest 5.x-1.x : the db_rewrite_sql is not needed to begion with :-/ (we only retrieve nids selected by views' main query, which takes care of the db_rewrite_sql...)
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
Benjamin.chiao CreditAttribution: Benjamin.chiao commentedI still have the problem.
Sometimes each individual is shown multiple times in the search results. Those individuals are those that have multiple answers to questions of the multiple value types.
Yes, there is a "group multiple values" option in the fields options (when constructing the view), the values are grouped indeed but the whole entry listed multiple times in the search results.
Any ideas?
Comment #9
derhasi CreditAttribution: derhasi commentedThat is a matter by design, and not part of the original problem. To solve your problem simply select "Node:Distinct" in your views' filter. ;)
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.