WAIT: Infinite Scroll Auth Error when WordPress REST API Authentication plugin enabled

Bricks Version: 1.6.2
Browser: Firefox 109
OS: macOS / Windows / Linux / etc.
URL: Integrations – Channel Automation

I installed the WordPress REST API Authentication plugin because I need a secure way to create posts on the website via API.

When the plugin is enabled, infinite scroll doesn’t work. I think this is more of a security feature since the infinite scroll uses an API request, no?

When the plugin is disabled, inifinite scroll works as expected.

This is the error i get:

GEThttp://wordpress-836948-3199641.cloudwaysapps.com/integrations/
[HTTP/1.1 200 OK 845ms]

GEThttps://unpkg.com/vue@3/dist/vue.global.js
[HTTP/2 302 Found 82ms]

GEThttp://wordpress-836948-3199641.cloudwaysapps.com/wp-content/plugins/motionpage/core/includes/assets/js/gsap/gsap.min.js?ver=3.10.4
[HTTP/1.1 200 OK 0ms]

GEThttp://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182
[HTTP/1.1 200 OK 0ms]

GEThttp://wordpress-836948-3199641.cloudwaysapps.com/wp-content/plugins/motionpage/core/includes/assets/js/gsap/ScrollTrigger.min.js?ver=3.10.4
[HTTP/1.1 200 OK 0ms]

GEThttp://wordpress-836948-3199641.cloudwaysapps.com/wp-content/plugins/motionpage/core/includes/assets/js/gsap/ScrollSmoother.min.js?ver=3.10.4
[HTTP/1.1 200 OK 0ms]

GEThttps://unpkg.com/vue@3.2.45/dist/vue.global.js
[HTTP/2 200 OK 0ms]

You are running a development build of Vue.
Make sure to use the production build (*.prod.js) when deploying for production. vue.global.js:11011:23
GEThttps://wordpress-836948-3199641.cloudwaysapps.com/wp-content/uploads/2022/09/cropped-logo-final-32x32.png
[HTTP/2 200 OK 0ms]

GEThttps://wordpress-836948-3199641.cloudwaysapps.com/wp-content/uploads/2022/09/cropped-logo-final-192x192.png
[HTTP/2 200 OK 0ms]

XHROPTIONShttps://wordpress-836948-3199641.cloudwaysapps.com/wp-json/bricks/v1/load_query_page
CORS Missing Allow Origin

	
OPTIONS
	https://wordpress-836948-3199641.cloudwaysapps.com/wp-json/bricks/v1/load_query_page
Status
403
Forbidden
VersionHTTP/2
Transferred223 B (0 B size)
Referrer Policystrict-origin-when-cross-origin

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wordpress-836948-3199641.cloudwaysapps.com/wp-json/bricks/v1/load_query_page. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wordpress-836948-3199641.cloudwaysapps.com/wp-json/bricks/v1/load_query_page. (Reason: CORS request did not succeed). Status code: (null).
XHRPOSThttps://wordpress-836948-3199641.cloudwaysapps.com/wp-json/bricks/v1/load_query_page

Uncaught SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
    onreadystatechange http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:139
    bricksQueryLoadPage http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:135
    bricksQueryLoadPage http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:114
    callback http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:106
    a http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:24
    a http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:21
    BricksIntersect http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:20
    bricksInitQueryLoopInstances http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:103
    bricksInitQueryLoopInstances http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:87
    <anonymous> http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:1450
    setTimeout handler* http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:1449
    EventListener.handleEvent* http://wordpress-836948-3199641.cloudwaysapps.com/wp-content/themes/bricks/assets/js/bricks.min.js?ver=1674120182:1448
bricks.min.js:139:26
Scroll anchoring was disabled in a scroll container because of too many consecutive adjustments (10) with too little total distance (0.106666672229767 px average, 1.06667 px total). integrations

If this isn’t a bug, can anyone teach me how to authorize Bricks for API?

Hi Izzy,
Thanks so much for your report, and welcome to the forum!

I’ve just installed the plugin and cannot see any issues or errors while using the infinite scroll feature.
You can try to toggle /bricks/v1/load_query_page off, to make it publicly accessible.

All the REST APIs listed below are protected from public access. You can uncheck the checkboxes to make it publicly accessible.

Best regards,
timmse

I will try this and give an update

Just a heads up for anybody having the same issue. In my case it was “disabling REST Api for non Admin” with Perfmatters that broke the infinity scroll. I haven’t expected that