Can't upload images or create subpages

If I try to create subpage or add an image in panel I get the smiley face, but the image doesn’t show thumbnail in panel. If I click the three dots below the image I just get empty box:

If I try to open image I get the following error:

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

I can find the image from content folder but not from media folder. Media folder has pages etc. folders correctly and also folders like “4114210473-1584603772” that contains hidden folder “.jobs” with “image-name-38x38.jpg.json” etc.

Same applies to subpages.

How I can try to solve this?

I already allowed PATCH method in .htaccess and if I try in the command line for example “curl -X PATCH” it doesn’t give 403 error which means that PATCH should be allowed. I tried disallowing PATCH and then the previous command gives me 403.

Are subpages actually created? What error do you get in the browser console when trying to create a subpage?

Console shows this error:

GET 404 (Not Found)

and this:

app.js:1 Error: The JSON response from the API could not be parsed. Please check your API connection.

Pages can be seen in the panel so they are created at least partly, but if I try to open them I get the API error

Is this a fresh Kirby installation without any plugins? Which version? What is your environment (OS, browser, server, PHP version, cache settings, anything)?

Have you enabled debugging in your config?

Debugging is enabled. Installation is quite fresh and works fine in my local Homestead environment. We don’t have any plugins that are related to Kirby. Kirby version is 3.3.3.

I have tested with Chrome and Firefox on Mac.
Site is on Debian GNU/Linux 8 and PHP version is 7.1.33

If I understand correctly, the problem only occurs on your remote server then?

Do thumbs work on the frontend?

What about server-side caching (OPcache, Varnish etc.)?

I managed to fix the problem myself and (not) surprisingly it was my mistake :slight_smile:

The reason for API errors was that I didn’t have correct .htaccess file in the remote server. What got me confused was that everything was working fine in local environment even with the wrong .htaccess, so I thought that the problem was somewhere in the remote server. So I just copied the htaccess from starter kit and it started to work!

But anyway, thanks a lot for your help! Nice to see that Kirby has good and active customer support!

Nice to hear you could fix it.

And welcome to our community! :slightly_smiling_face: