Localhost: The JSON response from the API could not be parsed

Good morning!

I’m running three Kirby’s :wink: on localhost, in my case XAMPP 3.2.4 - only Apache enabled. I’m using the Plainkit 3.4.4.

One of three instances in individual folders is showing

“The JSON response from the API could not be parsed. Please check your API connection.”

And I don’t know why. I copied a untouched Kirby-folder to that instance, but it did not help. :pensive: I’ve tried to search the forum, but I’ve found nothing that could match my problem (for my poor understanding of Kirby, PHP & Co).

Thank you in advance!

Dennis

Where does this error show up, in the Panel?

It often has to do with faulty code somewhere or dump() statements in context that are used within the Panel.

Hi Sonja!

Yes, in the panel: https://localhost/rcmc/panel/site shows the error.

Strange thing: https://localhost/rcmc/panel/pages/impressum works for example.

Edit: I’ve not touched the panel (site.yml) so far.

Have you touched any other files? If it does not happen in a fresh Plain- or Starterkit, than it is likely something in your code.

Not from the Kirby-folder, if that’s the question.

No, I’m not talking about the Kirby folder, but stuff in the site folder (templates, models, config, controllers etc.)

The kirby folder should never be modified, anyway.

Yes, I’m trying to build a site. :slight_smile: I’ve some templates, snippets, blueprints and config.

The config is looking good. I’ve renamed this files, so Kirby can’t see them. No changes to the panel. Where should I look first?

Edit: I’ve now tried to rename all possible files (tiny, simple site) to get ignored by Kirby. Did not help. :frowning:

Do you use any hooks? When exactly does the error appear? Is there any more information in the browser console that might help to find out where the error is coming from? Also check the network tab.

I’m a beginner, so I would say, that I’ll use basic-stuff only. No hooks, only the config.php like shown in the other thread.

The Network-Tab looks good. But the console does not. But this is saying nothing to me as a newbie…

console-export

Error: The JSON response from the API could not be parsed. Please check your API connection.
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
l https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
E https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
S https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
promise callbackr https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
promise callback
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
request https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
l https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
E https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
S https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
get https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
n https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
l https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
E https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
S https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
get https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
fetch https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
created https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
oe https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
Un https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
_init https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
a https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
sn https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
init https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
n https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
h https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
p https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
A https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
k https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
A https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
k https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
Io https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
_update https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
get https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
run https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
Zn https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
ge https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
fe https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
app.js:1:34170
onError https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
l https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
E https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
S https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
(Async: promise callback)
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
(Async: promise callback)
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
request https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
l https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
E https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
S https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
get https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
n https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
l https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
E https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
S https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:17
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
s https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
o https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:6
get https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
fetch https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
created https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/app.js:1
oe https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
Un https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
_init https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
a https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
sn https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
init https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
n https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
h https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
p https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
A https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
k https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
A https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
k https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
Io https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
_update https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
r https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
get https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
run https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
Zn https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
ge https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23
fe https://localhost/rcmc/media/panel/6c7cf65934d9cb4da34dd7f174cb8bab/js/vendor.js:23

Again: When does this error appear? When loading the Panel after login? When you do something specific?

I guess it doesn’t happen with a freshly installed kit? Because your other two instances seem to work flawlessly?

Oh, sorry. Yes, when I’m logging in to that panel it appears. It’s only the /panel/site - that’s not working.

The other sites and the plainkit are working well.

Sonja helped a lot behind the scenes - thank you, @texnixe, and we finally found my mistake. In my site.txt we found german umlaute (“ü” instead of “ue”) in front of the colon.

Now it’s working… until my “tiny mistake”… :innocent: