I have the following problems with Date Fields in Views. I am using PHP 5.2.6, Date Module 6.x-2.0-rc6, CCK Module 6.x-2.1.

1. I have a Content Type containing a Date Field, with "Number of Values" set to Unlimited, and "To Date" set to Never. I am not using the "Repeat Options widget. I have a View which only filters on the Node Type, and outputs the Node Title, Body and the Date field.

*** If I configure the Date field to "Group Multiple Values" (there are multiple values present), then it gives the following error when run:

 warning: implode() [function.implode]: Invalid arguments passed in C:\wamp\www\test\sites\all\modules\date\date\date_handler_field_multiple.inc on line 65.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY node.nid ASC, node_data_field_date.delta ASC' at line 1 query: SELECT node.vid AS _vid, node_data_field_date.delta as _delta, node.nid AS _nid, node_data_field_date.field_date_value AS value FROM content_field_date node_data_field_date LEFT JOIN node node ON node.vid = node_data_field_date.vid WHERE node.vid IN (1,2) AND ORDER BY node.nid ASC, node_data_field_date.delta ASC in C:\wamp\www\test\sites\all\modules\date\date\date_handler_field_multiple.inc on line 67.  

Clearly the "WHERE ... AND ORDER BY ..." near the end is wrong.

*** If I turn off "Group Multiple Values" then I get no error and (I think the correct output) one entry listed for each date line in each node selected.

2. If I change the configuration of the Date field to use the Repeat Options Widget to create a series of dates, I get the same error when I also set "Group Multiple Values" on the output Date field.

3. (Using the Repeat Options Widget) If I add a Filter to the View to select only certain Dates (e.g. > now) then I no longer get the error above, but:

*** Setting the "Group Multiple Values" option has no effect. All the entries are still listed separately. Adding Distinct=Yes to the Basic Settings makes no difference, unlike the effect if I do the same using simple text fields instead of Dates.

*** Setting "Group Multiple Values" with "Show 1 value(s)" suppresses the display of the Date field in the second and subsequent iterations, but I still get a number of separate entries with other fields displayed.

4. What I am trying to do is:
a) set a Node to have a number of Dates, probably using the Repeat Options Widget,
b) filter a View to only select current dates (e.g. > now)
c) display each date separately in one View (e.g. as basis for a Calendar)
d) display a single entry for each Node in another View (with the initial Date plus Repeat Rule style of display)

With thanks,
Tony

Comments

Encarte’s picture

Same problem described in 1. I was able to get around it it by turning off "Group Multiple Values".

karens’s picture

Status: Active » Fixed

I cannot reproduce this problem in the latest code. @Encarte, if you are really using version rc6, as this issue says, you need to get current on the latest code. If you still have problems after that, go through the debugging steps on the project page. If there is a problem after that, I need a lot more detail about how you have your view configured and what kind of field you're using because I can't replicate it.

Closing this issue because the version is so old. If there's a problem in the latest code, open a fresh issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

syakely’s picture

While trouble shooting a view for a client I came across this too. They had in fields, a date field, that had a relationship to a node reference field in the same content type, that would have a reference to a different content type with that field. If there is no node reference, there is no vid for that field and it's making a bad query.