Changing page status error, JSON response

I have weird bug with a specific template. When I try to change the status of a page of that template from draft to listed, the change does not happen but instead I get some JSON returned from the changeStatus endpoint.

The culprit seems to be the num setting in the blueprint. If I remove this, it works:

num: '{{ page.aStart.toDate("Ymd") }}'`

This worked in 3.7.x but seems to break in ^3.8.0. However, I could not reproduce this in a fresh Starterkit, so it must be caused my setup. I have tried all kinds of things to figure this out:

  • Removed all plugins
  • Removed all hooks
  • Removed the custom model

But no luck so far.
Anyone have an idea?

Did you try the exact same setting with the date field in a fresh Starterkit? Is this field you are querying there always filled in?

Yeah, it’s all the same. The date field is required and set to now by default.
I turned of the num setting for now and instead change it in a page.changeStauts:after hook, which weirdly works fine.

Have you tried to debug this with xDebug?

Thanks Sonja, I’ll look into that, haven’t really worked with xDebug before.

We have a recipe here that should help you to get going: First steps to start debugging with Xdebug | Kirby CMS

1 Like