I am using more than two views in home page. i am getting following error. please help me to solve

"Views Infinite Scroll module can't handle more than one infinite view in the same page."

Comments

JohnnyW’s picture

Issue summary: View changes

Just change line 66 from > 1 to > 100 or whatever you have for that page... it will stop alerts on web browser.

Line 66 on file

sites/all/modules/views_infinite_scroll/js/views_infinite_scroll.js

 else if(Drupal.settings.views_infinite_scroll.length > 100) {
          alert(Drupal.t('Views Infinite Scroll module can\'t handle more than one infinite view in the same page.'));

I had 12 on one page, so this fixed it :D

2pha’s picture

The above is not a fix as their should not be multiple items in the settings array for the same scroller.

I get this problem with a view in a panel, but only if the panel is cached.
I only have 1 infinite scroller on the page, but looking at the Drupal.settings.views_infinite_scroll array, I see there are 2 array entries for the same scroller, just keying these array elements by their selector may fix this issue (though still wont allow for more than 1 scroller per page, which the module probably should). It also means the js will need to change as the setting object will no longer be an array, but an object.

honza pobořil’s picture

Status: Active » Closed (outdated)