This is essentially the same issue reported and fixed in #326129: Filter operator 'Is not between' never satisfies, but specifically about the date filter which was overlooked in that issue. The solution should be the same or similar.

Adding a date filter with the op set to 'is not between' gives an empty result. The query uses an AND instead of an OR, e.g.: (node.created >= 1283324400) AND (node.created <= 1282806000), which will never match anything.

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new931 bytes

Yeah this is problem. Here is a patch

gilgabar’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the quick patch. It resolves the issue for me.

merlinofchaos’s picture

Version: 6.x-2.11 » 7.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to both 6.x branches. Does not apply to 7.x -- possibly not necessary with dbtng.

aspilicious’s picture

Status: Patch (to be ported) » Needs review

d7 has different code in head.

// %s is safe here because strtotime scrubbed the input and we might
// have a string if using offset.
$this->query->add_where($this->options['group'], $field, array($a, $b), 'BETWEEN');

If this is correct for D7 we can close this.
Else I will make a patch!

dawehner’s picture

StatusFileSize
new1.35 KB

* Commited a test file for 6.x-3.x
=> The patch at #1 fixed the problem :)
* Added the test file 7.x-3.x

This one is really not easy to port.
Added a basic conversion

dawehner’s picture

Status: Needs review » Fixed

The placeholder issue fixed this issue, too.

Status: Fixed » Closed (fixed)

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

stella’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Status: Closed (fixed) » Needs work

Sorry for re-opening this, but I'm not sure that this patch actually made it into the 6.x-2.x branch as suggested in comment #3 above. That comment was added 12th Oct 2010, but 6.x-2.12 release came out on 15th Dec 2010 and doesn't include the fix.

dawehner’s picture

Status: Needs work » Fixed

Sure, the 6.x-2.12 is from the code based on 6.x-2.11 but with the security fix.

That's documented in the release announcement :)

Status: Fixed » Closed (fixed)

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