I'm not seeing the argument display in the summary for either a page or a block display. It seems to work fine with user info - as in the example on the help page. I went through that example step by step. (see: drupal/help/views/getting-started) Yet, with node info, and with a Date field as an argument, I only see list bullets with the count value () in text next to it. The link doesn't appear.
I've gone back and forth and have searched through bug issues with nothing found that can help me. I think it's a bug. If I come up with a workable solution, I'll post it here as well - unless one of you can get to it first! Thanks so much.
Comments
Comment #1
merlinofchaos commentedYou're not being 100% clear here, so I quote the above as it appears that you're only seeing this problem with date fields. If you are, please read and follow the instructions. If not, please provide concise instructions for duplicating the problem you have.
Comment #2
merlinofchaos commentedI should also point to the 'archive' view (it's a default view that you can easily enable and use as an example) that functions with a basic node created field.
Comment #3
jefftrnr commentedI'm moving this to Date - Earl (merlinofchaos) is correct. The archive preset view works with the Argument Summary correctly.
MY problem happens when I select a Date for my argument and "Granularity" set to Year... the query is correct, but no link is displayed.
Comment #4
mike_r1977 commentedI'm experiencing this as well. Under Arguments, I choose Date: Date, then select my Date field with Granularity set to 'Year' and Method set to 'OR'. The display I chose was List. When I got to the section called Defaults: Configure summary style for Argument "Date: Date", I got these warnings:
Needless to say, I get no year summary at all.
Comment #5
sonofmarx commentedI am recieving the exact same error.
I've been attempting to create a summary with my granularity set to Month.
Comment #6
mike_r1977 commentedMoving this to Date API since the error comes from there. Is there anything one could do to help? I can only test patches, but I'd gladly do it since I badly need this.
Comment #7
mike_r1977 commentedThis also happens with 6.x-2.x-dev.
Comment #8
rhache commentedI'm getting this error as well, but would like to point out that I get the error regardless of the settings I choose for granularity or method in views:
I would be willing to help with any kind of testing that is required to help move this along.
Sincerely,
Rene
Comment #9
mike_r1977 commentedThis still happens with 6.x-2.0-rc4.
Comment #10
mike_r1977 commentedI'm not familiar with Date API, so please forgive me if I'm saying something obvious or downright stupid, but I really need this, so I tried a bit of debugging. These are the problematic lines:
I added a basic:
before line 82 (the $check_fields up there) and when clicking on the Update button on the first Defaults: Configure Argument "Date: Date" I got Array.
Next I removed that error message line and put it again before line 89 (that is to say before $form_state['values']['options']['date_fields'] = array_filter($form_state['values']['options']['date_fields']) ).
On the first screen, no message; I click update and I get again Array on the Change summary style for Argument "Date: Date" screen.
If I remove the error line and click update, then I get the warning messages that stops the view from working, almost as if the array wasn't passed from the second to the third screen.
I have no idea if this is useful or pointless, but I thought I'd share in case someone else can shed more light on this issue.
Comment #11
karens commentedThis message indicates that there is no array of date fields in the form, and there should be no way that can happen. Edit the date argument and see if it is showing you a list of possible date fields with checkboxes next to each one. Do you see that list? If so, you have an array being passed to the validation.
I can't replicate this at all, so lets start by confirming that the array of date fields shows up in the argument settings.
Comment #12
mike_r1977 commentedFirst of all, thank you Karen for taking the time to reply.
Yes, I do get the list of date fields with checkboxes next to each one. The error is not there, but later in the process. Everything seems to be working perfectly up until the third screen called: Defaults: Configure summary style for Argument Date: Date, where I'm asked:
It's above these options that I get the dreaded error message.
I can replicate this error on a fresh installation of Drupal 6.5, with only the latest CCK, Views and Date module installed. I don't know if it helps, but this is the test view I created on this fresh installation and that gives me the same error (and, most importantly, no summary):
Comment #13
karens commentedThat's the problem then, you're choosing to display a summary instead of supplying a default value, but I've been testing a different path, where I set the argument up to provide a default date.
Now that I know what you're doing to get the error, I can see if I can reproduce it and find the best fix.
Comment #14
mike_r1977 commented[Edited to add more details]
The probably related patch here helps, but does not fix the problem with argument summaries: I still get exactly the same warning messages, but this time I do get a summary: unfortunately, instead of having:
linked to the page view with the added argument as I was expecting, I get instead:
linked to the page view, without the added argument.
[Edited to add even more details]
Since the patch now allows the query to be generated, I ran it directly in my database and I got the correct years (2006, 2007, 2008).
Comment #15
batbug2 commentedmike_r1977, i second that, i have exactly the same problem
Comment #16
cindyr commentedAny progress on this? I've just started using this, and I'm getting the same errors (#8) in the same situation (#12) using 6.2-2.0-rc4...
Comment #17
giorgoskHad exactly same problem
6.x-2.x-dev solves the problem partially
I can see the summary page
but then when I click on the 2008 to see nodes for that year
I get page not found and this error message
Comment #18
giorgoskThe DEV is actually working correctly
the previous problem was that the
date range on the argument was too restrictive -3 - +3
for the range that I had set for my CCK field
isn't there a way to grab the date range from the CCK field as default ?
Comment #19
ar-jan commentedWhat is the latest status on this issue? I am using rc6 and I do not get any of the errors mentioned before, but it does seem something isn't right using summary views of date fields.
When I make a Views block, choose a cck date field as argument, granularity year, and 'Summary, sorted descending', and use the list style, I do get a list but not a summary:
In my case I have 5 nodes with the year 2008 in their date field, the 'summary' view (with record count) produces this:
* 2008 (1)
* 2008 (1)
* 2008 (1)
* 2008 (1)
* 2008 (1)
Instead of
* 2008 (5)
This looks related to the problems mentioned before. Re http://drupal.org/node/307256#comment-1062474 : are there known problems using summary with date fields?
(If this is actually not a date/views problem but my mistake, apologies).
Comment #20
rig commentedi have exactly the same problem!!!
Comment #21
rhache commentedA colleague of mine and myself have also encountered the same problem when setting a date argument summary granularity to "year". Each month gets its own line.
I've tried both the dev and rc6 release on Drupal 6.8 with Views 2.2.
Sincerely,
Rene
Comment #22
gmreed commentedSubscribe. (aka Colleague - posted same issue to Views: http://drupal.org/node/364444 - apologies for having created a duplicate)
Comment #23
Crell commentedI think the root cause is here: #342224: Summary, sorted ascending/descending Views by Date don't work
Not marking this as a duplicate just yet, but I suspect it is.
Comment #24
karens commentedI just posted a change to the argument summary that seems to help get it to group by date and granularity properly and the sorting also works correctly for me. Some of the Views code changed and that changed the way the Date argument needed to react.
If there are problems in the latest -dev code you can reopen.
Comment #26
designcontext commentedI've got the problem with the 7.2
Comment #27
Fajan commentedI also got the same problem on 7.4 with dev versions of Views, Date and Entity. I have submitted a bug report on this a week ago here... #1207540: Inappropriately ungrouped display summary of content date field. (Am not duplicating that one yet cos I think this bug is specific to the 7.x-dev trunk.)
Comment #28
Fajan commentedBug has been fixed in 7.x dev.