I am making this a new issue, instead of adding to the old issue, because I'm using a different version of Calendar-- my apologies if that's not the right procedure.

I have a calendar on my site, I've added exposed filters that work fine on table views, but on a calendar view, they do nothing. I have selected to inherit exposed filters, and I am using Views 6.x.2.5 and Drupal 6.11

Here is the query the view produces:
SELECT node.nid AS nid,
node.title AS node_title,
node_data_field_dates.field_dates_value AS node_data_field_dates_field_dates_value,
node_data_field_dates.field_dates_value2 AS node_data_field_dates_field_dates_value2,
node_data_field_dates.field_dates_rrule AS node_data_field_dates_field_dates_rrule,
node_data_field_dates.delta AS node_data_field_dates_delta,
node.type AS node_type,
node.vid AS node_vid,
node_data_field_date.field_date_value AS node_data_field_date_field_date_value,
node_data_field_date.field_date_value2 AS node_data_field_date_field_date_value2,
node_revisions.body AS node_revisions_body,
node_revisions.format AS node_revisions_format,
node_data_field_venue.field_venue_nid AS node_data_field_venue_field_venue_nid,
node_location_instance__location.city AS node_location_instance__location_city,
'Unknown' AS node_location_instance__location_distance_6
FROM node node
LEFT JOIN content_field_dates node_data_field_dates ON node.vid = node_data_field_dates.vid
LEFT JOIN content_type_fieldtrip node_data_field_date ON node.vid = node_data_field_date.vid
LEFT JOIN content_field_venue node_data_field_venue ON node.vid = node_data_field_venue.vid
LEFT JOIN node node_node_data_field_venue ON node_data_field_venue.field_venue_nid = node_node_data_field_venue.nid
LEFT JOIN location_instance node_node_data_field_venue__location_instance ON node_node_data_field_venue.vid = node_node_data_field_venue__location_instance.vid
LEFT JOIN node node_location_instance ON node_node_data_field_venue__location_instance.nid = node_location_instance.nid AND node_location_instance.nid != 0
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
LEFT JOIN location_instance node_location_instance__location_instance ON node_location_instance.vid = node_location_instance__location_instance.vid
LEFT JOIN location node_location_instance__location ON node_location_instance__location_instance.lid = node_location_instance__location.lid
WHERE ((node.status <> 0) AND (node.type in ('date', 'fieldtrip')))
AND (((DATE_FORMAT(ADDTIME(node_data_field_dates.field_dates_value, SEC_TO_TIME(-18000)), '%Y-%m') <= '2009-05' AND DATE_FORMAT(ADDTIME(node_data_field_dates.field_dates_value2, SEC_TO_TIME(-18000)), '%Y-%m') >= '2009-05')) OR ((DATE_FORMAT(ADDTIME(STR_TO_DATE(node_data_field_date.field_date_value, '%Y-%m-%dT%T'), SEC_TO_TIME(-18000)), '%Y-%m') <= '2009-05' AND DATE_FORMAT(ADDTIME(STR_TO_DATE(node_data_field_date.field_date_value2, '%Y-%m-%dT%T'), SEC_TO_TIME(-18000)), '%Y-%m') >= '2009-05')))
ORDER BY node_data_field_dates_field_dates_value ASC, node_data_field_date_field_date_value ASC

If there's something else I could post that would be helpful, please let me know.

Thanks,
Ellen

Comments

earthangelconsulting’s picture

Version: 6.x-2.x-dev » 6.x-2.2

I have a similar problem... I am trying to pass an "event type" to the View, as an Exposed Filter (by adding it to the URL, in the way that an exposed filter block would)... but that filter value doesn't appear in the URLs pointed to by "next" or "prev" in the Month view, or any other links in the view, for that matter... all that is in the URL parameters is the date value.

and yes, I have told the "month" attachment to inherit exposed filters. It doesn't seem to help.

So does this mean that I have to create an entirely separate View for each event type? that means maintaining all other Calendar configuration in multiple places, and having to change it in multiple places!! certainly not an optimum solution, even for only three event types.

or is there a way of having multiple attachments in month/day view, where they have different names and different hard-coded filter values (rather than exposed filters) for the different event types?

cheers
Peter 'Fish' Fisera
GoatVirus Technologies

earthangelconsulting’s picture

oops, my bad

i forgot to post what versions i was using

Date 6.x-2.3
Calendar 6.x-2.2
Views 6.x-2.6

and i also forgot to follow Karen's advice and upgrade to the latest dev version before reporting bugs!

i upgraded Date to 6.x-2.x-dev and now the exposed filters work! i guess that is where the problem was.

cheers,
Fish

Anonymous’s picture

I have the same problem - using a taxonomy term in an exposed filter. Can't browse to previous or next month and have the filter work.

Views 6.x-2.x-dev (same problem using 6.x-2.6)
Date 6.x-2.3
Calendar 6.x-2.2

ahb’s picture

Yes, same here. The default month view applies the filter, but as soon as I switch month the calendar the filter is lost.

cels’s picture

subscribe

hefox’s picture

I'm also having the same issue :(

(Edit: Oh, I got it working, but I was too embarrassed to post why it wasn't working, big oh duh).

earthangelconsulting’s picture

@ahb, @hefox, did you see my comment in #2?

"i upgraded Date to 6.x-2.x-dev and now the exposed filters work!"

did you try that?

note (not that this likely affects any of you, but just to prevent someone from taking tips from me and then going down the wrong path)... when I first posted comment #1, I was trying to pass "Event Type" as an exposed filter, but I later found that it was better to send it as an Argument instead (mainly for this reason: so that I could put Calendars for different Event Types into blocks, passing different Arguments to different invocations of views_get_view and view->execute_display... if using an exposed filter rather than an argument, this works for full page calendars that can refer to the URL parameters, but is useless for calendar blocks that may have a different event type than what the page URL shows...)

however, if you want to use exposed filters for your purpose, that's fine... just make sure you use the latest version of Date.

peace out
Fish
GoatVirus Technologies / Earth Angel Consulting

Nchase’s picture

with Views 3 and latest dev of date / calendar the view will not work with an exposed filter. It just stays the same. Tried different exposed filters.

mattrweaver’s picture

I fixed this by putting the exposed taxonomy filter (set for term id and dropdown) in both the calendar page view AND the month view. Now things sort just fine.

Neslee Canil Pinto’s picture

Status: Active » Closed (outdated)

The D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one.