Hi
Thanks for the module. It meets a use-case I have:
My web site manages conferences that are held every two years. I am building a view to show orders for a specific event: for example, 2012 should show 2011--2012, since registrations may start in the year prior to the event.
My contextual filter for the view was working fine for uc_orders:creation_date's of 2012, 2011, etc. I installed your module to allow a range, but it doesn't seem to work.
Enabling the range for uc_orders results in "An illegal choice has been detected. Please contact the site administrator."
After I cancel the dialog, I get "SQLSTATE[42000]: Syntax error or access violation: 1064 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 ') + INTERVAL 39600 SECOND), '%Y%m%d') = '2012' ) ))) subquery' at line 1" in the preview window.
My guess is that you only handle standard node date fields, and no other date fields. All the other issues reported so far are date related.
Thanks!
Steve.
Comments
Comment #1
rdeboerHi Steve,
So the Date you want to range-filter on is definitely not a field?
Because the combo of Views together with the Date module already supports date ranges for fields. So you don't need this module when you're after date field ranges (see project page).
If it is the node creation date property, then you must use the format that is dictated by your View.
How are you passing the date range? Via the URL? Like: "..../20110101--20121231"?
Or if your View is configured to accept years only it will bye ".../2011--2012".
Rik
Comment #2
ohO_oho commentedIf this is ordinary Date field, $this->real_field can be NULL here:
So there should be something like this:
File: contextual_range_filter.admin.inc
Comment #3
rdeboer@ohO_oho
You may be onto something.... will investigate.
BTW the file you refer to is
contextual_range_filter_handler_argument_date_range.inc,yeah?Rik
Comment #4
rdeboerI checked in a change similar to #2 into the dev branch. Haven't tested it yet. Anyone?
Rik
Comment #5
bisonbleu commentedRan into this issue: filtering on date range such as "2014-01-05--2014-01-10" not working while running version 7.x-1.3.
The dev version appears to completely fix this issue.
Comment #6
rdeboerBased on the above I've created a new release containing the fix: 7.x-1.4.
Thank you Oho_oho and bisonblue.
Rik