Skip Navigation

[Resolved] The response is not a valid JSON response.

This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by karenG-4 3 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#2167209

What are you trying to do?
Create a single post template for a CPT. The template has 3 views on it and I'm using the Views block, not legacy views.

Toolset is throwing 504 errors and crashing the site. In Safari Developer Tools, I get the following error: XMLHttpRequest cannot load (file name) due to access control checks. admin-ajax.php won't load, which crashes the site.

The site is loading very slowly (29 seconds to first contentful paint), apparently because of Toolset related errors, even on the home page which has no Toolset-generated content.

NOTE: I'm getting similar errors on another site with Toolset, though that one isn't crashing. Just very slow to load.

Is there any documentation that you are following?
I found several instances of this same error in the Tickets Database, and looked at the solutions in all of them. I have made a staging site copy of the site, disabled all other plugins and enabled the 2021 WP Theme. I also installed the Enable JQuery Migrate Helper plugin to see if that would help and it did not.

What is the link to your site?
I will provide admin login credentials to the staging site. Please give me a private message.

#2167635

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL and admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2167927

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I logged-in to the admin panel but I can not edit any of the template you created using blocks.

Can you please share FTP access details or check the error logs and share the error log so I can see what error its causing.

I have set the next reply to private which means only you and I have access to it.

#2170123

I'm now having similar issues with two other sites, in addition to the one we are already discussing in this ticket.

One of the sites only has Types and Blocks installed, one CPT with custom fields, and is using one view on one page. I'm getting the White Screen with "this site has experienced a critical error." These errors go away if I disable Toolset.

The other site has Access, Blocks, Forms, Forms Commerce, Types, and WooCommerce Blocks. It has 4 CPT with custom fields. I don't think it has any views on the site; I'd have to double-check.

#2170999

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you are using the plugin jQuery Migrate - I just disabled that plugin:

And then edited the content template for single Instructors CPT and I tried to add the heading block and I tried to display the dynamic link using heading and its working just fine.

Can you please confirm it works as expected when you disable jQuery migrate plugin?

#2171199

I did not have jQuery Migrate installed on the site when I started having problems. I added it based on results of my search in the Toolset support directory which recommended installing it.

Removing jQuery Migrate is not solving my problems on the live site. I'm still getting:
XMLHttpRequest cannot load (file name) due to access control checks
Sometimes admin-ajax.php won't load, which crashes the site, generating a 504 error, about 1/2 of the times I try to access the page.
30+ second load times for a page on the front end, and sometimes GTMetrix / Lightspeed can't connect to the site to get me results.
On the Instructors CPT, if I click the view on front end button, I get no content.

I get the above errors when accessing the site on Safari, Chrome, and Firefox, whether I use a usual window or an incognito window.

These are the Safari Javascript Console Errors that I get when I open the Instructors CPT Content Template:

[Error] Unhandled Promise Rejection: [object Object]
(anonymous function)
promiseReactionJob
[Error] Unhandled Promise Rejection: [object Object]
(anonymous function) (data.min.js:2:14368)
asyncFunctionResume
(anonymous function)
promiseReactionJobWithoutPromise
promiseReactionJob
[Error] Fetch API cannot load hidden link due to access control checks.
_ (api-fetch.min.js:2:5017)
asyncFunctionResume
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
P (api-fetch.min.js:2:5281)
u (toolset-common-es.js:2:517010)
(anonymous function) (toolset-common-es.js:2:516795)
w (index.js:2:80488)
a (index.js:2:80692)
(anonymous function) (index.js:2:80751)
Promise
(anonymous function) (index.js:2:80642)
u (toolset-common-es.js:2:517010)
(anonymous function) (toolset-common-es.js:2:516795)
P (index.js:2:84520)
a (index.js:2:85681)
(anonymous function) (index.js:2:85740)
Promise
(anonymous function) (index.js:2:85631)
e (lodash.min.js:87:339)
u (lodash.min.js:87:383)
s (lodash.min.js:88:259)
(anonymous function) (index.js:2:846354)
(anonymous function) (load-scripts.php:18:3916)
(anonymous function) (index.js:2:846553)
(anonymous function) (lodash.min.js:33:430)
[Error] Fetch API cannot load hidden link due to access control checks.
_ (api-fetch.min.js:2:5017)
asyncFunctionResume
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
P (api-fetch.min.js:2:5281)
(anonymous function) (view-editor.js:1:12539)
Promise
s (view-editor.js:1:12520)
p (view-editor.js:1:7562)
(anonymous function) (view-editor.js:1:8266)
(anonymous function) (load-scripts.php:18:3916)
(anonymous function) (index.js:2:185838)
forEach
(anonymous function) (index.js:2:185593)
(anonymous function) (load-scripts.php:18:3916)
(anonymous function) (index.js:2:846553)
(anonymous function) (lodash.min.js:33:430)
[Error] Fetch API cannot load hidden link due to access control checks.
_ (api-fetch.min.js:2:5017)
asyncFunctionResume
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
P (api-fetch.min.js:2:5281)
(anonymous function) (view-editor.js:1:12539)
Promise
s (view-editor.js:1:12520)
p (view-editor.js:1:7562)
(anonymous function) (view-editor.js:1:8266)
(anonymous function) (load-scripts.php:18:3916)
(anonymous function) (index.js:2:185838)
forEach
(anonymous function) (index.js:2:185593)
(anonymous function) (load-scripts.php:18:3916)
(anonymous function) (index.js:2:846553)
(anonymous function) (lodash.min.js:33:430)
[Error] Unhandled Promise Rejection: [object Object]
(anonymous function)
promiseReactionJob
[Error] Fetch API cannot load hidden link due to access control checks.
_ (api-fetch.min.js:2:5017)
asyncFunctionResume
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
t (api-fetch.min.js:2:1194)
P (api-fetch.min.js:2:5281)
(anonymous function) (redux-routine.min.js:2:1291)
some
r (redux-routine.min.js:2:9238)
(anonymous function) (redux-routine.min.js:2:9188)
c (redux-routine.min.js:2:9289)
t (redux-routine.min.js:2:9545)
Promise
(anonymous function) (redux-routine.min.js:2:1417)
(anonymous function) (data.min.js:2:14364)
asyncFunctionResume
(anonymous function) (data.min.js:2:14368)
asyncFunctionResume
[Error] Unhandled Promise Rejection: [object Object]
(anonymous function) (data.min.js:2:14368)
asyncFunctionResume
(anonymous function)
promiseReactionJobWithoutPromise
promiseReactionJob
[Error] XMLHttpRequest cannot load hidden link due to access control checks.
send (load-scripts.php:2:82719)
ajax (load-scripts.php:2:78296)
(anonymous function) (load-scripts.php:5:3937)
l (heartbeat.min.js:2:1507)
(anonymous function) (heartbeat.min.js:2:2724)
[Error] Failed to load resource: The request timed out. (admin-ajax.php, line 0)

#2171355

I deactivated the Autoptimize plugin, which minifies Javascript and CSS. This appears to have solved the 504 and access control issues.

I also downloaded today's update of the Types plugin.

I was keeping the Instructors template in draft mode until I was finished with it. I published it to see what would happen, and I can now see a preview of the appearance of a post. This is one thing I find very frustrating about Toolset. I don't want to publish things before I'm actually finished with them. But many aspects of Toolset don't work unless there's a published post. In addition to the template preview as mentioned here, I can't pull dynamic content, either in a block or in a view, unless there's a published post of that CPT. It doesn't matter if there's posts for the CPT that are in draft form. I'm often working on new content that is to be published later, eg the speakers for an event, and so I don't always have published posts to work with.

My issue is resolved now. Thank you!