First of all, great addition to views. Much needed.
here is the problem...
I am creating a table views using these
'daterange:today-7' => t('within the past week'),
'daterange:today-1M' => t('within the past month'),
'daterange:today-3M' => t('within the past 3 months'),
'daterange:today-1Y' => t('within the past year'));
I can not get them to work as a default sort. So I exposed the filter and defualted to 'within the past week'. When initially looking at the view the values show 'daterange:today-7' and 'today' and the sort does not show me the nodes from the last week. It shows all of them. Yet when I toggle off and back on to 'within the past week' and submit I see 'today-7' and 'today'. This sorts correctly and shows me the nodes only from the past week.
Thus it appears that the default sort inserts 'daterange:..." into the default value while it should just instert the 'today-7'.
I looked at the code and see where you are doing this but can not take out the 'daterange:' without breaking it.
I hope this helps with debugging.
Comments
Comment #1
douggreen commentedThis should now be fixed in the 4.7.x-1.x-dev and 5.x-1.x-dev branches. Please let me know if it doesn't work. Thanks for the bug report!
Comment #2
(not verified) commentedComment #3
svetlin commentedHi,
I've tried both 4.7.x-1.2 and 4.7.x-1.x-dev with no success. I have a cck content type with date field and a page view to show nodes only "within the past month". When the filter is exposed and I sort trough the form, everything is ok, but otherwise it's not working, i see all nodes.
Am I doing something wrong?
Comment #4
douggreen commentedIs this related to 110108.
Comment #5
douggreen commentedsvetlin, please open a new issue if this is dfferent than 110108. I'm going go reclose this one so that NathanRAFT doesn't continue to get notified about your problem...