Problem/Motivation

With JS aggregation turned on, and all items can be displayed on one page (i.e. number of results is less or equal number of items on page), infinite_scroll.js throws a message `Drupal.views is undefined`
?>

Proposed resolution

Explicitly require views/views.ajax when including infinite_scroll.js

Remaining tasks

Write the patch

Comments

valthebald created an issue. See original summary.

valthebald’s picture

Status: Active » Needs review
StatusFileSize
new694 bytes
RumyanaRuseva’s picture

StatusFileSize
new335 bytes

I believe adding the library as dependency is a better approach than attaching it separately. Here is a patch for that.

valthebald’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense @RumyanaRuseva. Marking RTBC

honza pobořil’s picture

In config form there is text:

Note: The infinite scroll option overrides and requires the Use AJAX setting for this views display.

Will be nice to update it.

valthebald’s picture

@Bobík: why do you think this text should be updated?

honza pobořil’s picture

@valthebald After this patch option Use AJAX will not be required to be enabled manually, so we should not ask user to do it.

  • RumyanaRuseva authored 0051c1e on 8.x-1.x
    Issue #2998366 by RumyanaRuseva: Explicitly require views/views.ajax...
honza pobořil’s picture

Status: Reviewed & tested by the community » Fixed

I've decided to remove that text completely because it is not needed after this change.

sam152’s picture

After this patch option Use AJAX will not be required to be enabled manually, so we should not ask user to do it.

This is not true, clicking the setting is still required.

sam152’s picture

Status: Fixed » Needs work

  • a6344bb committed on 8.x-1.x
    Issue #2998366 by RumyanaRuseva: Explicitly require views/views.ajax...
honza pobořil’s picture

Status: Needs work » Fixed

Sorry, you are true. Fixed that.

Status: Fixed » Closed (fixed)

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