Authentication issue when saving draft with diacritic letter

When I create a new draft under pages and write any letter into my Layout field and it saves fine. When I try writing a diacritic letter, say the letter “ü”, then it brings up this.

{“status”:“error”,“message”:“Unauthenticated”,“code”:401,“exception”:“Kirby\Exception\AuthException”,“key”:“error.auth”,“file”:“/kirby/config/api/authentication.php”,“line”:14,“details”:,“route”:“pages/([a-zA-Z0-9\.\-_%= \+\@\(\)]+)”}

I cannot reproduce this. Could you please provide more information:

  1. Your exact Kirby version
  2. Your (dev) environment (local, remote, PHP version etc.)
  3. Does this happen in a Starterkit/Plainkit or your custom project/theme?
  4. In what sort of block type within a Layout field does this happen? Or in what way is this related to the Layout field?

Hi There,

i have the same error every time I try to save anything…
with Kirby 4.0.3 but only on local environment (mamp pro)

{“status”:“error”,“message”:“Unauthenticated”,“code”:401,“exception”:“Kirby\Exception\AuthException”,“key”:“error.auth”,“file”:“/kirby/config/api/authentication.php”,“line”:14,“details”:,“route”:“pages/([a-zA-Z0-9\.\-_%= \+\@\(\)]+)”}

is there anyone who can help…?!

What PHP version are you using? Will try to reproduce with my Mamp pro version once I know which PHP version to test.

PHP 8.1.10

only one Plugin installed: AutoID (I know its part of the core now with kirby 4 but I need it for structure fields)

I still cannot reproduce this with Mamp Pro and PHP 8.1.13 (don’t have 8.1.10 installed).

Please download a fresh Starterkit and try again. If you still encounter this issue, please post exact steps to reproduce in Starterkit.

What I tested:

In the layout field in the about page in a text block added äöüá etc. and saved without issues. Then made the page a draft and tried again, again without issues.

Okay, after some further testing I figured out it is the AutoID-Plugin in Combination with Kirby 4

The problem is I really need this Plugin für Ids in Structure fields.

@texnixe: can you say if or when UUIds for Structure items will be part of the core?

Best regards, Matthias

No, unfortunately, I can’t tell.

Would be interesting to know why this happens with the AutoId plugin. Does it only happen for drafts like it says in the title of this topic?

No, it happens for every saving process, no matter if it is draft or what letters are used… :frowning:

Maybe ask @bnomei if he knows what the issue might be and if there is a way to solve it.

i did not do much testing of using autoid with k4 and i do not intend to add support for it.

you can get a simple uuid for structures as suggested here: Discord
BUT it will not account for duplicating items in the structure (without additional code)

The issue lied within the server that was hosting my Kirby site. The server host told me that due to PHP being updated Kirby’s functionality largely broke. Now that my hosting server has been reconfigured and its PHP version and extension requirements synchronized, everything is back to normal.

I’m sorry if I’m too vague or even incorrectly explaining it, but this is only synopsis of what transpired over the past few weeks, which already went a bit over my head.

In short, if you also are experiencing similar issues, then the problem might lie in your PHP version or extensions or how they’re configured. I have to emphasize that these problems did not occur on my local client.