I found some similar topics, but nothing that seamed related to my issu.
I have this error message in my panel. Activating Debug doesn’t show anything.
My host is Fortrabbit. I just realized the bug. I think the last thing I did was update Kirby to 3.5.3.1. That being said, the local version works as expected (with Laravel Valet, PHP 8)!
Here are my Fortrabbit settings (with PHP 7.4, but changing it to 8 didn’t seams to resolve the issu).
Error: The JSON response from the API could not be parsed
onParserError — app.js:1:22240
(fonction anonyme) — app.js:1:17486
asyncFunctionResume
[native code]
promiseReactionJobWithoutPromise
Hm, I’m a bit lost. Since it works locally, I would assume that there’s some server side configuration that’s causing this. What about server side caching? Have you tried to purge/disable that?
If you open Developer Tools in the browser, and inspect the JSON/Panel responses, what is their content? There could be your answer; I remember debugging some very old project of mine, where expected JSON kept failing just to discover that response was actually misformatted because of some PHP errors
Hey @adamkiis, thanks for the suggestion. I find nothing that seams weird.
Here’s the HTML from Inspect Elements.
<section class="k-pages-section k-section k-section-name-projet"><header class="k-section-header"><h2 class="k-headline"> <!----></h2><!----></header><div data-theme="negative" class="k-box"><div data-size="small" class="k-text"><strong> The section "projet" could not be loaded: </strong> The JSON response from the API could not be parsed </div></div></section>
<header class="k-section-header"><h2 class="k-headline"> <!----></h2><!----></header>
<div data-theme="negative" class="k-box"><div data-size="small" class="k-text"><strong> The section "projet" could not be loaded: </strong> The JSON response from the API could not be parsed </div></div>
<div data-size="small" class="k-text"><strong> The section "projet" could not be loaded: </strong> The JSON response from the API could not be parsed </div>
<strong> The section "projet" could not be loaded: </strong>
The JSON response from the API could not be parsed
<div data-size="small" class="k-text"><strong> The section "projet" could not be loaded: </strong> The JSON response from the API could not be parsed </div>
<div data-theme="negative" class="k-box"><div data-size="small" class="k-text"><strong> The section "projet" could not be loaded: </strong> The JSON response from the API could not be parsed </div></div>
<section class="k-pages-section k-section k-section-name-projet"><header class="k-section-header"><h2 class="k-headline"> <!----></h2><!----></header><div data-theme="negative" class="k-box"><div data-size="small" class="k-text"><strong> The section "projet" could not be loaded: </strong> The JSON response from the API could not be parsed </div></div></section>
And the Console log
Error: The JSON response from the API could not be parsed
onParserError — app.js:1:22240
(fonction anonyme) — app.js:1:17486
asyncFunctionResume
[native code]
promiseReactionJobWithoutPromise
onError — app.js:1:22082
(fonction anonyme) — app.js:1:17731
asyncFunctionResume
(fonction anonyme)
promiseReactionJobWithoutPromise
app.js:1:11815