Can't save pages in panel

If I try and save a page i get:

Exception: undefined

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

The network tabs shows this:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)

Is there anything else in the console maybe relating to a PATCH request?

https://getkirby.com/docs/guide/troubleshooting/panel#panel-error-messages

yes I get:

VM209:1 PATCH http://mysite.com/api//pages/info 405 (Method Not Allowed)

In that case you have to contact your hosting provider. Or if the server is your own, make sure to allow PATCH requests.

thanks I have contacted them and they have disabled ModSecurity , but the problem persists.

and the error message is still the same?

yes i am getting:

VM273:1 PATCH http://mysite.com/api//pages/home 405 (Method Not Allowed)
(anonymous) @ VM273:1
request @ app.js:1
post @ app.js:1
patch @ app.js:1
save @ app.js:1
(anonymous) @ vendor.js:17
h.dispatch @ vendor.js:17
dispatch @ vendor.js:17
save @ app.js:1
e @ vendor.js:39
t._withTask.t._withTask @ vendor.js:39

app.js:1 Error: The JSON response from the API could not be parsed. Please check your API connection.
at app.js:1
dm.config.onError @ app.js:1
(anonymous) @ app.js:1
Promise.catch (async)
request @ app.js:1
post @ app.js:1
patch @ app.js:1
save @ app.js:1
(anonymous) @ vendor.js:17
h.dispatch @ vendor.js:17
dispatch @ vendor.js:17
save @ app.js:1
e @ vendor.js:39
t._withTask.t._withTask @ vendor.js:39

Maybe you can try to set the Access-Control-Allow-Methods header in your .htaccess:

Header add Access-Control-Allow-Methods "PUT, GET, POST, PATCH, DELETE"

Just a guess from googling around a bit.

Thanks @texnixe, this did not have any effect.

I sent the host: https://support.plesk.com/hc/en-us/articles/115002202793-Unable-to-use-DELETE-PUT-or-PATCH-HTTP-verbs-with-php-files-or-Web-API-405-HTTP-verb-used-to-access-this-page-is-not-allowed

and they replied: The specified verb permissions, as shared in the KB, were set up by default. I have modified it to allow all verbs

still not working - is there a way I can test if PATCH requests are blocked?

Can you do other things in the panel, like creating or deleting pages? Changing the Uploading files?

no, all results in the same error.

Have you checked your file/folder permissions/ownership? If you can’t do anything in the Panel, then it’s probably rather a permission/ownership issue.

What a timing. I currently have the exact same problem on a Host Europe server:

image

@thguenther Any insights? First time you use that server for a Kirby 3 project?

@texnixe I just transferred the domain to this server and I’m still hopeful my issue will be solved automatically once I wake up tomorrow morning. Maybe it has something to do with the relatively fresh dns settings.

Searching the forums for this error and finding this new thread made me think it could be the same thing. But let’s wait a few hours.

Good night and good luck, then. :sleeping::four_leaf_clover:

what permissions should I be checking - the content folder? Does kirby not do a permissions check during the panel install?

Yes, I think it does check if they are writable when you install the Panel. Have you tried to do that? I was assuming you uploaded a project with the first Panel user already installed.

My problem was indeed related to a DNS issue. I guess it’s something else for you, @_gareth_j :pensive:

I zipped up all files from the dev server then extracted them on the new server. I installed the panel and there were already user accounts. The panel works, it just will not save anything.

glad you sorted it @thguenther - I don’t think this can be a dns issue for me as it is not a new domain.