I have a jcarousel view that uses ajax. If you click the left arrow after the page loads you get this error:
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 '-1, 3' at line 13 query: SELECT DISTINCT node.nid AS nid, node_node_data_field_billboardset_billboardref_node_data_field_billboard_image.field_billboard_image_fid AS node_node_data_field_billboardset_billboardref_node_data_field_billboard_image_field_billboard_image_fid, node_node_data_field_billboardset_billboardref_node_data_field_billboard_image.field_billboard_image_list AS node_node_data_field_billboardset_billboardref_node_data_field_billboard_image_field_billboard_image_list, node_node_data_field_billboardset_billboardref_node_data_field_billboard_image.field_billboard_image_data AS node_node_data_field_billboardset_billboardref_node_data_field_billboard_image_field_billboard_image_data, node_node_data_field_billboardset_billboardref.nid AS node_node_data_field_billboardset_billboardref_nid, node_node_data_field_billboardset_billboardref.type AS node_node_data_field_billboardset_billboardref_type, node_node_data_field_billboardset_billboardref.vid AS node_node_data_field_billboardset_billboardref_vid FROM node node LEFT JOIN content_field_billboardset_billboardref node_data_field_billboardset_billboardref ON node.vid = node_data_field_billboardset_billboardref.vid INNER JOIN node node_node_data_field_billboardset_billboardref ON node_data_field_billboardset_billboardref.field_billboardset_billboardref_nid = node_node_data_field_billboardset_billboardref.nid LEFT JOIN content_type_billboard node_node_data_field_billboardset_billboardref_node_data_field_billboard_image ON node_node_data_field_billboardset_billboardref.vid = node_node_data_field_billboardset_billboardref_node_data_field_billboard_image.vid WHERE (node.status <> 0) AND (node.nid = 48) LIMIT -1, 3 in /var/aegir/platforms/drupal/drupal-6.19/sites/groups.devsites.com/modules/views/includes/view.inc on line 771.
I think the proper behavior is that the left arrow should probably be absent or disabled until after the first slide has advanced forward.
Let me know if you need anything else.
Thanks for such a great module.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | jcarousel_reverse_ajax.patch | 808 bytes | quicksketch |
Comments
Comment #1
Naiya commentedI got the same.. only when I click "prev". if i click "next" several times - error on "prev" button is not showing.. besides, it creates (sometimes, somehow) two empty entries.
.. LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE (node.type in ('story')) AND (node.status <> 0) AND (users.uid in ('5')) LIMIT -3, 4
so.. subscribing.
Comment #2
gmclelland commentedJust to be clear, you can navigate backwards if you first go forward.
The problem happens when you navigate backwards before the first slide.
So if you have slides 1, 2, 3, you can click the right arrow to move forward to slide 2. Once you are on slide 2 you can go back to slide 1, but not slide -1.
Hope that helps clarify the problem.
Comment #3
Stephan de Bruin commentedI am experiencing the same issue when using "circular" as value for wrap content.
Navigating to the next slide works fine, but going back past the first slide breaks the slider and throws the SQL error mentioned above.
subscribing
Comment #4
quicksketchI've found a partial solution to this issue, but I don't think the jCarousel library is yet capable of handling this situation. When you go backwards in a circular carousel with AJAX, jCarousel (the library), doesn't take into account how many items in are in the list. Instead of being able to insert items 25 of 25, 24 of 25, and 23 of 25, jCarousel tries to insert items -1, -2, and -3. Even if you insert the correct items by -1, -2, -3, etc, jCarousel doesn't remember what -1, -2, and -3 items are if you go forwards and then backwards again. :P
For the time being I think this may need to be a postponed issue, I think we'll need collaboration with the jCarousel library to make this possible.
Comment #5
quicksketchOh, here's my existing patch, which seems like it would work if jCarousel library were handling wraps correctly when combined with AJAX.
Comment #6
quicksketchSimilar issue filed at #1196428: Combination of Circular Wrap Content and Back Button Causes SQL Error.