I am using bootstrap theme and on scroll I'm getting this error for super admin.
Failed to load resource: the server responded with a status of 403 (Forbidden)
Uncaught Drupal.AjaxError

Comments

sriharsha.uppuluri created an issue. See original summary.

tsi’s picture

7 months and not a single comment?
Same happens to me. in a custom theme (base theme: classy).
Did you find the cause?

tsi’s picture

In my case it was the view access-argument that was killing my ajax calls, seems like a bug, but in my case I could just remove it.

caspervoogt’s picture

I just updated to 8.3.7 and now this started happening to me, too;

Failed to load resource: the server responded with a status of 403 (Forbidden) views/ajax?_wrapper_format=drupal_ajax

I don't know yet why this is happening. Views access argument is the default "view published content" so that should be fine. I am also logged as superadmin, but it should not make a difference.

dabbor’s picture

I had the same problem and after I updated the views_infinite_scroll module to 1.5.0 version the problem was gone, but a new one arised: After I click the "Load More" button, the page is reloaded with the next page content (according to pager).

ericpugh’s picture

Priority: Normal » Major

I'm having the same issue as described in #5, using 1.5 and Drupal 8.3.7, where the "Load More" button causes a page reload. This may have something to do with the security views/ajax changes made in 8.3.7 and might be related to #2902831: Entity browser views that do not have use_ajax explicitly enabled are broken with 8.3.7

dabbor’s picture

We found out that the problem was caused by missing docroot/core/modules/views/js/ajax_view.js file as it wasn't loaded due the option Use AJAX being switched off.

It wasn't required before to have the option "Use AJAX" enabled before in order to make the Views Infinite Scroll work, but after the View's update it is needed. Probably it is the way it should work and previous behavior was just a bug.

smaz’s picture

This may be related to the recent core update:

https://www.drupal.org/SA-CORE-2017-004

Alex Bukach’s picture

@dabbor thanks for #7, you saved my day!

drupalfan2’s picture

Version: 8.x-1.3 » 8.x-1.5

I updated drupal core from 8.3.6 to 8.3.7 and now the Load more button from "views infinite scroll" does not work anymore:

Views Infinite Scroll 8.x-1.3 -> a lot of error messages in chrome console.
Views Infinite Scroll 8.x-1.5 -> Load more button does nothing!!!

Can you tell me how to solve this (maybe some solution above helps, but which?). Thank you.

smaz’s picture

@drupalfan2, if you ensure that the view is set to use ajax, under the advanced options on the right hand side, that should work.

drupalfan2’s picture

Thank you very much.
This seems to work for both versions of Views Infinite Scroll.

caspervoogt’s picture

@dabbor for #7, thank you! I had updated, and my scroller stopped working. This solved it for me.

dalin’s picture

In my case even though when I edit the view it said:

> Use AJAX:Yes (Forced)

it apparently wasn't happening. When I edited the AJAX settings, saved the setting, and saved the view, then everything started working again.

Kleve’s picture

Proposed solution to manually enable AJAX in the view does not work for me. No error messages displayed. Any ideas or anyone else experiencing this?

Setup
Drupal 8.3.7
Views infinite scroll 8.x-1.5

Update: The problem occures when placing the the view block within a paragraph. As a regular view block placed from the block page, everything works as expected.

andrew_hoffi’s picture

I've also noticed that Ajax is failing, but I believe this is because of a conflict with either Better Exposed Filters or Masonary.js

staceroni’s picture

I followed the resave ajax suggestion.

I exported the configuration and compared the view that was having the issue.

use_ajax: true was added to configuration upon saving the ajax settings.

I am no longer getting the 403 ajax error.

owntheweb’s picture

@dabbor #7: YES. My day is better now. Thanks!

XerraX’s picture

happend to me too after updating drupal...

handkerchief’s picture

in my case, when I click on the button, the button disappears and nothing else happens, no javascript error.

Drupal 8.4.0
Views Infinite Scroll: 8.x-1.5+1-dev

cola’s picture

After drupal update same issue

FlutterStack’s picture

Priority: Major » Critical
FlutterStack’s picture

@dabbor #7: worked for me. Thanks!

Keith Caulkins’s picture

@dabbor Thank you! Comments #5 and #7 helped me a ton!

inversed’s picture

I was able to work around this issue by setting the View to use AJAX for "All" displays and then turning AJAX off for any Views displays that didn't need it.

I noticed that in some versions of Drupal, the displays that used Infinite Scroll had their AJAX option set to "Yes (Forced)" which wasn't working correctly.

Neslee Canil Pinto’s picture

Status: Active » Closed (works as designed)