Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2009 at 15:56 UTC
Updated:
21 Jul 2011 at 04:46 UTC
Hi,
Using a modified calendar view (see http://ur1.ca/do3a), grouping by a CCK Date field does not work. What puzzled me is that on my dev. environment it works. It is probably not a bug but a configuration error somewhere.
Does anybody have any idea of where to look ?
PS: I attached a screenshot of the view style config.
| Comment | File | Size | Author |
|---|---|---|---|
| view-group-date.png | 65.52 KB | pbuyle |
Comments
Comment #1
pbuyle commentedAfter some crude debugging, it appears that on my production site (where groupin is not working), in
views_plugin_style::render_grouping($records, $grouping_field),$this->view->field[$grouping_field]->theme($row)returns an empty string. It appears to do so until$this->row_plugin->render($row)in first invoked later inviews_plugin_style::render().For quick reference, here is the full code for the two functions from views_plugin_style.inc
Comment #2
pbuyle commentedSorry, this is probably not a bug in views... But I'm still lost and don't know exactly where to look.
Comment #3
merlinofchaos commentedTry the -dev version, which has had significant changes to the grouping. Note that I *just* made a commit, so try the -dev version after midnight GMT to get the most current version. I'm pretty sure this will fix your problems.
Comment #4
pbuyle commentedSwitiching to 6.x-2.x-dev doesn't solve the issue.
Worse, now all fields are displayed empty. The sourrounding markup is here, but actual rendering of field values is missing. I check the "Hide empty fields" in style parameters, all the fields and their labels are still displayed.
Comment #5
pbuyle commentedOk, it's not a bug, reverting the theme to Garland fix both issues. All I have to do is to debug my theme...
Comment #6
pbuyle commentedComment #7
pbuyle commentedThe the culprit is views-view-field.tpl.php in my theme folder... but even when the file is the same as the original sites/all/modules/views/theme/views-view-field.tpl.php, the grouping doesn't work in views-6.x-2.6 and all field disapear with views-6.x-2.7.
Finaly, it may be a bug.
Comment #8
dyke it commentedi'm having the same problem grouping by content type in a block with HTML list, unformatted and grid. the table style is grouping fine.
i'm using the latest dev. i also tried switching my theme to garland which doesn't work.
Comment #9
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 (on all views styles). yay! :)
Comment #10
pbuyle commentedIn my case, the "distinct" value is already "no". And switching theme works, do does removing views-view-field.tpl.php from my theme.
Comment #11
tompte commentedI have the same problem.
Distinct or not...
Comment #12
dyke it commentedi was wrong, it isn't grouping properly whether distinct or not. i'm also having the same problem with grouping in all views.
Comment #13
Bilmar commentedsubscribing
Comment #14
merlinofchaos commentedDoes this patch fix it? http://drupal.org/node/619884#comment-2250378 -- I suspect not. If that patch doesn't fix it, it may be a problem with date.module itself, because the grouping is ultimately handled by the style and I suspect you're using a date.module provided style.
Please test that patch and if that patch doesn't fix it, reroute this issue to date.module
Comment #15
pbuyle commentedOk, I will try the patch asap. But if it doesn't fix the issue, I doubt the bug is in the date.module. As I said, removing the views-view-field.tpl.php file from the theme folder solve the issue. Even if it's an identical copy of the the original sites/all/modules/views/theme/views-view-field.tpl.php one. Also, when updating Views to 6.x-2.7, the issue is worse as all fields are rendered as the empty string. Again, having no views-view-field.tpl.php in the theme folder solve the issue in 6.x-2.7.
Comment #16
merlinofchaos commentedOH! If it's related to the presence of absence of that template, that's a core bug. =) I think it may be http://drupal.org/node/591804
Comment #17
kriskhaira commentedNote for others and myself — if you are using the Internationalization or Locale module, go to Date and time > Locale date settings and make sure the date format settings are consistent across different languages.