Problem/Motivation

Having multiple view blocks on the same page with the GET option enabled and the pager configured to used Views Infinite scroller causes strange behaviour: the initial click on the load more is a POST request and the subsequent clicks are GET.

Remaining tasks

Investigate cause of problem and propose a solution.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nbaosullivan created an issue. See original summary.

vasi1186’s picture

I think this is most probably related to https://drupal.stackexchange.com/questions/246368/bug-or-a-feature-drupa...

In views_ajax_get_views_pre_render() the viewsAjaxGet setting is an indexed array, but this does not seem to work, only the first item is considered.

A fix would be to use associative arrays (which are converted to objects in JS) instead of indexed arrays. I attached a small patch that should fix the issue.

nbaosullivan’s picture

Status: Active » Reviewed & tested by the community

Tested patch in #2 on 8.7.5 with 8.x-1.0-rc1 and this resolves the issue.

  • Leon Kessler committed 4b9093e on 8.x-1.x authored by vasi1186
    Issue #3088768 by vasi1186: Multiple view blocks with Infinite Scroller...
Leon Kessler’s picture

Status: Reviewed & tested by the community » Fixed

Thanks vasi1186 and nbaosullivan. Patch looks good to me. Committed and pushed to 8.x-1.x branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.