Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 error when visiting plugin page in panel #27

Open
ericpedia opened this issue Mar 21, 2022 · 1 comment
Open

500 error when visiting plugin page in panel #27

ericpedia opened this issue Mar 21, 2022 · 1 comment

Comments

@ericpedia
Copy link

First off, I'm very excited about the plugin. Thank you for building it! It's so well thought out, and I can't wait to start using it.

Issue: When I visit the plugin page (/panel/git), console shows two 500 errors on the API requests, resulting in a non-working page showing an empty dialog (see screenshots).

About my installation:

  • Kirby 3.6.2
  • PHP 8.1.3
  • HTTPS: off (running on localhost)
  • Debugging: On (error also occurs when debugging is off)
  • Plugins: Only oblik/git (installed via composer)
  • No custom config settings for plugin
  • Git repo/branches set up as outlined in docs, using system git on MacOS

This is the error response when I visit the API routes directly:

{"status":"error","message":"Unauthenticated","code":403,"exception":"Kirby\\Exception\\PermissionException","key":"error.permission","file":"\/kirby\/config\/api\/authentication.php","line":14,"details":[],"route":"git\/status"}

Any advice?

image

image

@hdodov
Copy link
Contributor

hdodov commented Mar 22, 2022

You get the "Unauthenticated" error when you visit the routes directly because you need to pass in a CSRF token along with the request, so that's expected to not work.

I have a website running with almost the same versions:

  • Kirby 3.6.2
  • PHP 8.0.13

Maybe there was a breaking change in PHP 8.1.*? I don't have time at the moment to switch PHP versions and test.

You could use Xdebug and configure it to stop when it encounters and exception (which is what's happening, judging by your second screenshot). Maybe then, you could find where that exception is thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants