Closed (fixed)
Project:
jCarousel
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2011 at 18:22 UTC
Updated:
9 Dec 2011 at 23:50 UTC
If I add to page two or more views with same id and display (but different args), jcarousel have for all carousels equal number of items, so some carousels are cutted or have empty items.
This issue exists because jcarousel store settings like this:
$identifier = drupal_clean_css_identifier('jcarousel_view__' . $view->name . '__' . $display_id);
So two views have the same identifier and overwrite settings.
I think that the good way to solve this issue is add dom_id value to identifier, or maybe any knows some better way?
Comments
Comment #1
quicksketchThanks, looks like you're right here, but I'm not sure what to do to correct this problem. Views gives each individual view (or instance of the same view) a unique dom-id class, but we don't know what that class will be until the view has been printed to the page.
Comment #2
murzMaybe we can use static counter variable in this function that increase value on each new jcarousel created?
Comment #3
quicksketchI think we need to implement the suggestion in #1095504: Make AJAX loading optional when "Use AJAX" is enabled in the view, which would completely decouple the Views AJAX setting from the jCarousel AJAX setting.
Comment #4
quicksketchThis issue should be fixed by the entirely new approach in #1095504: Make AJAX loading optional when "Use AJAX" is enabled in the view. We're now keeping our own AJAX settings so we're not dependent upon Views' DOM IDs, as we're now making our own.
Comment #5
murzYes, applying patch from #1095504: Make AJAX loading optional when "Use AJAX" is enabled in the view solve this issue for me. Thanks!
Comment #6
quicksketchGreat! I actually made a new release (2.6) that you can download directly from the project page or with drush, rather than using the patch.