I have looked at #596668: Grouping field not "grouping" nodes and #361298: Grouping field problem when "link to node" enabled but the outputs seems to be different
and I am using 2.x dev from Oct 29 2009 (reason being some translation fixes being committed to dev)
here is how to reproduce from a clean install of drupal 6.14
- allow story to categorize using vocabulary "color"
- "color" vocabulary contains "black" and "blue"
- create stories in this order
story1ColorBlack, story2ColorBlue, story3ColorBlack
- creating a minimal view so we can test grouping
- table style (no grouping yet),
- use fields title,body,term (accept all defaults look at first attachement for preview of view)
- modify style of table group by term
(results in on the corresponding screenshot, not all nodes get displayed)
- if we change the default order the display will be different
- change order by term
(results in on the corresponding screenshot, still not all nodes get displayed)
seems that the query is done right since views knows that there are two black nodes and one blue but they don't get displayed correctly
I have looked at #502348: How group display by mutliple fields? and apparently that patch has already been applied to the latest dev version of views which I am using
I have eclipse and debugger and running but I don't know how I can debug this, any pointers ?? Or how can I help ?
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 619884-grouping-incorrectly.patch | 2.93 KB | merlinofchaos |
| #8 | og_landing-view.txt | 16.04 KB | mariagwyn |
| #5 | views-grouping-grid.jpg | 10.03 KB | giorgosk |
| #4 | fix-grouping-index-bug.patch | 2.05 KB | merlinofchaos |
| views_grouping_term_sorted.jpg | 15.01 KB | giorgosk |
Comments
Comment #1
giorgoskSorry for the last two jpgs
Term: Black is missing on top (I actually applied wrong crop)
Comment #2
RoboPhred commentedI am having the same issue. In my case, I am grouping a list of nodes by the domain they come from (via Domain Access). This was working fine on 6.x-2.x, but I updated to dev in order to have a functional "has new content" filter.
There should be 2 different items in my resulting view, one per domain. Both domains show up, but the single item under both is the same item from the first domain.
Comment #3
tomsm commentedI have just submitted an issue that describes the same problem with the 6.x-3.x-dev version. See also:
http://drupal.org/node/620486
PS. Sorry for the duplicate.
Comment #4
merlinofchaos commentedOk, thank you for the detailred reproduction instructions. I was able to find the cause of this and fixed it. For reference, this is the patch, but it's already applied in CVS.
Comment #5
giorgosk@merlinofchaos thanks for the fast fix
the grouping does indeed work better with views 2.7 which includes the patch above
BUT,
grouping of
grid style, Row style: Fieldsstill does not work correctly(using Row style:node does not allow grouping)
see attached image (still working with the same example above)
I tried Alignment: Horizontal and Vertical but both give same result
I checked with the debugger and the grouping is done right but
rendergets called with the right row (node) but returns a different one renderedChecked further in the theme.inc
and before
$render_functiongets called$variablescontains mixed stuff(content != raw) ??!!!!!!
but I am quite at a loss to debug further, but hope this helps
Comment #6
giorgoskSorry forgot to change status
Comment #7
dyke it commentedi'm also having the same issue with HTML list, unformatted and grid. the table style however is grouping things perfectly.
Comment #8
mariagwyn commentedI am having the same issues. "Grouping field" was working fine. I don't even recall upgrading, but now, it is not working. I reinstalled 2.x-dev, no good; tried 2.7, also no good. I have tried html, unformatted, table, grid...none of them group at all.
I have attached my view.
Comment #9
giorgosk@mariagwyn
if you are indeed using 2.7 after upgrade there seems to be lots of issues with sorting
#622602: 2.6 to 2.7: Queries being created without ORDER BY and #624042: Sorting of data appears not to be working after update
Comment #10
mariagwyn commentedIt appears the problem has nothing to do with Views. It is the devel-Theme-Developer which is mucking up the output of all sorts of things. I turned it off and it appears that grouping in both 2.7 and 2.x-dev work just fine.
Comment #11
dyke it commentedi'm still having the same problem with styles unformatted, html list and grid. i've tried grouping based on various different fields with no success (except in table style which works fine)
i'm using the latest dev. i also tried switching my theme to garland which doesn't work, and i do not have devel-theme-developer installed.
thank you very kindly :)
Comment #12
dyke it commentedi updated to the latest dev and it didn't appear to be working at first, but then i changed "distinct" to "no" and it worked. grouping is now working for me on all view styles. yay views magic! :)
Comment #13
dyke it commentedi guess i spoke too soon. my view is a related content block that is displayed on node pages. when it displays in default drupal pages (blog, poll, book etc.) it groups everything fine regardless of the view style. however, when it displays on a content type created with cck, the grouping works only with the table style - every other style does not group correctly.
EDIT: and now grouping doesn't appear to be working in any view regardless of content type or settings.
Comment #14
vlooivlerke commentedSame issue here. Rolling back to 2.6 fixed the problem :(
Comment #15
Pasi commentedAnd also the same issue ("has new content" filter didn't work) and the same fix (2.6).
But now distinct (view og_ghp_ron with VBO) doesn't work :(
Comment #16
merlinofchaos commentedTry this patch, I think this fixes it for styles not named table.
Comment #17
giorgoskapplied patch on 6.x-2.7 version and tested with
HTML list - row style: fields
Grid - row style: fields
Unformatted - row style: fields
Table - row style: fields
and grouping seems to be working correctly
nothing else breaks - should be good to be committed
Comment #18
dyke it commentedSame here. I applied the patch and everything is working perfectly!! Thank you so much!!!
Used it on 6x-2.7 and tested on:
HTML list - row style: fields
Grid - row style: fields
Unformatted - row style: fields
Table - row style: fields
Comment #19
chromix commentedI also just wanted to note that I applied this patch to 2.7 and everything with row style: fields worked great.
Comment #20
giorgoskis it safe to say reviewed and tested by the community ??
Comment #21
merlinofchaos commentedApplied to all branches. Thanks for testing!
Comment #22
c-c-m commentedHello,
I find extremely difficult to apply a patch. Is there any plan to make a new release that solves this bug in the near future? I am using 2.7 version and I am having the same issue.
Thanks
Comment #23
giorgosk@c-c-m
comment #21 from merlin means that this patch was applied in all the branches and thus should be available at the latest dev build dated Dec 1st
Comment #24
c-c-m commentedThank you, GiorgosK
But latest stable version is 6.2.7 dates from 02 Nov, and thus the patch has not been applied. The only way to solve this problem is by installing dev version, but I guess that means that it's not stable and I don't know what kind of problems can I have if I install it on my live site. If I am to use only stable versions... waiting is the only option I have (at least that I am aware of), that's why I was asking about the date of the next stable release.
Regards
EDIT: today December 3rd was released a new version (6.2.8) which has solved the error.
Comment #25
techgirlgeek commentedInstalled 6.2.8 yesterday that said it finally fixes the GROUP BY issues. However now I can't get any style to group, not even HTML list, which I know I could before.
Running the same query directly in mysql with the GROUP BY put in it works fine.
Update: Went into the fields, and removed the "Display as a Link" checkbox from the "Excluded" group by field.
Comment #26
merlinofchaos commentedOverloaded terms. It fixes grouping issues, not GROUP BY issues.
This is a different thing. I'm not sure what GROUP BY stuff you are referring to, but it's for another issue.
Comment #28
rjbrown99 commentedThis works for me. I thought I would point out that the patch in #16 has not been applied to 6.x-3.0-alpha1. I am on that version and had to manually apply it. Just hoping to save someone a bit of troubleshooting time.
Comment #29
eriktoyra commentedThanks! You just saved me from a couple of hours of banging my head against the wall. With the devel-Theme-Developer enabled the Views grouping stops working. Grouping works fine for me in 2.8. This information should be put into in the Views documentation.
Comment #30
dawehnerOk than change tag.
O_o: do you want to make this? This would be cool
Comment #31
dawehnerupdate.
Thx for creating a new issue http://drupal.org/node/708882
Comment #32
dready2011 commented@mariagwyn #10
Thanks, that remark finally solved my issues. I had a view that grouped fine on my local machine, but wouldnt work on my staging server. I spent HOURS to figure out why, checking all settings, modules, etc. But it turned out that I had Devels Theme Info activated on staging and not local, and that destroyed the grouping!!! Could have searched on for days, I never imagined something like that to be the cause...