kirby3-janitor icon indicating copy to clipboard operation
kirby3-janitor copied to clipboard

syntax error, unexpected token ")"

Open theamnesic opened this issue 1 year ago • 3 comments

Hi,

With Kirby 3.5.7, php 8.0.8, Janitor 2.16.2, I've got the syntax error, unexpected token ")" error alert on this tasks :

  • cleanCache
  • flushSessions
  • render
  • thumbs
  • backupZip

flushPages works.

Switching to php 7.4 give this error : syntax error, unexpected '|', expecting variable (T_VARIABLE).

Console error : GET https://mysite.com/api/plugin-janitor/cleanCache/%24 500 (Internal Server Error)

https://mysite.com/api/plugin-janitor/cleanCache/ return {"status":"error","message":"Unauthenticated","code":403,"key":"error.permission","details":[]}

Any idea?


Edit : I'm using composer to update. When I download the files via Github instead of composer update, it's working.

theamnesic avatar Sep 21 '22 16:09 theamnesic

Hi, same problem with Kirby 3.6.6.1 and PHP 8.0.23-he.0

saschen avatar Sep 26 '22 07:09 saschen

i need a bit more information to debug this since i can not replicate it myself.

  1. how are you calling the janitor job? panel button or CLI?
  2. is it the browser js console you are referring to? how did the GET request get triggered? via the panel button, right?
  3. if the errors are thrown, could you turn on kirbs debugging so i can get a filename and preferable line number?
  4. whats your dev setup like? osx with mamp etc...

you can not call the endpoint manually (without the setup for a secret... see wiki) thats why the auth error is thrown in that case.

bnomei avatar Oct 11 '22 16:10 bnomei

Hi Bruno!

how are you calling the janitor job? panel button or CLI?

By the panel button.

Capture d’écran 2022-10-12 à 19 00 21

is it the browser js console you are referring to? how did the GET request get triggered? via the panel button, right?

Yes, the browser console, via the panel button.

if the errors are thrown, could you turn on kirbs debugging so i can get a filename and preferable line number?

Hope this can help:

Capture d’écran 2022-10-12 à 18 56 05

whats your dev setup like? osx with mamp etc...

Same behavior in my local Mamp and my web hosting.

theamnesic avatar Oct 12 '22 17:10 theamnesic