If make a view and the extra looks like

0:
- field: field_a
- value: a
1:
- field: field_b
- value: b
3:
- field: field_c
- value: c, d, e, f

The extra condition for the third one ends up being in (a, b, c, d, e f,) instead of (c, d, e, f)

That is because it makes the placeholders via imploding $arguments, but $arguments includes all placeholders for the entire join (as it's needed later)

            $placeholder = '( ' . implode(', ', array_keys($arguments)) . ' )';

(It feels like this should have been reported already, but couldn't find it)

Comments

hefox’s picture

Status: Active » Needs review
FileSize
569 bytes
None View
hefox’s picture

FileSize
1.19 KB
None View

wrong patch, oops.

hefox’s picture

FileSize
654 bytes
None View

try 3, sorry

SocialNicheGuru’s picture

dev version 12/15 seems to have this patch already

mpotter’s picture

Not sure why you say that. It definitely is *not* in dev version. But this patch no longer applies to v3.14 so here is a re-roll

shagren’s picture

Status: Needs review » Needs work

The last submitted patch, 6: 52473389-views-exta-args-alt.patch, failed testing.

shagren’s picture

shagren’s picture

robertwb’s picture

Status: Needs work » Needs review

Thanks @shagren - I can confirm the erroneous behavior that you point out here, that is, when adding multiple extras, one of which is an "IN" causes the IN clause to get all previous arguments. This patch works as advertised. Changing status to "Needs Review" in order to trigger the test bot.

robertwb’s picture

BTW - what's with the "52473389-" prefix in the patch file names? Since this is issue 2473389 I would have expected "2473389-" to be the number.

veroniqueg’s picture

patch #9 works for me, thanks

robertwb’s picture

Renamed the patch since previous version had prepended the number "5" obscuring the issue. Just tidying, nothing substantive added.

SocialNicheGuru’s picture

re-roll of #5 https://www.drupal.org/node/2473389#comment-11301447 for use with OpenAtrium and views 3.16