Placeholder arguments are processed in _views_replace_args() and double %% symbols (which represent literal % symbols) are replaced with a single % symbol. Later on these single % symbols may be reinterpreted as argument placeholders and removed. To solve this, _views_replace_args() needs to replace any single % symbols with double %% symbols.
To reproduce this problem, create a view that uses a "contains" operator and use a value that begins with "s", "d", "f", or "b". After _views_replace_args() the query looks right (e.g. "... title LIKE '%something%' ...") but then this query is reprocessed by the regular database functions and the '%s' part might be replaced with whatever the first query argument was.
| Comment | File | Size | Author |
|---|---|---|---|
| views_replace_arguments_fix.patch | 1.07 KB | benshell |
Comments
Comment #1
merlinofchaos commentedThis is already fixed in -dev.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.