If I create a view that uses JCarousel as the style plugin, set use ajax to "Yes", and add for example the Node: Published or Admin filter, I get SQL errors, as the JCarousel module does not utilise views query substitutions, so I get an error along the lines of
"user warning: 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 '***CURRENT_USER*** AND ***CURRENT_USER*** <> 0) OR ***ADMINISTER_NODES*** = 1)"
Not sure on the best approach to fix this, but I'm guessing the count query in jcarousel_views_add() should take care of query substitutions? As well as possibly doing a db_rewrite_sql() just in case I don't have access to all the images being shown in the carousel?
Or is this simply not supported? If such, this should be added into the README.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | jcarousel_wildcards.patch | 2.17 KB | quicksketch |
Comments
Comment #1
quicksketchThanks for the report. Seems like this should be a fairly easily solved problem.
Comment #2
jennypanighetti commentedFor what it's worth, I just installed jcarousel and have the same error. Mine says it's in includes/jcarousel.views.inc line 111.
Comment #3
quicksketchHere's a patch which fixed the problem in my testing. I updated my local sandbox with Views 3 and found that it's a bit easier to get working (though unfortunately not quite backwards-compatible). This patch includes the Views 3 changes even though that's not really related.
Comment #4
aspedia commentedPatch fixes the problem for me here. Nice. (Views 6.x-2.x)
Comment #5
quicksketchThanks committed to both D6 and D7 branches.