Uuid in blueprint causes false duplicate page error

When a call to page.uuid is present in a blueprint and a new draft of this specific blueprint is created in the panel, it shows

Error: A page draft with the URL appendix "..." already exists.

But the page is created anyway and shows up in the pages section when refreshing the panel after cancelling the dialog.

I tried a fresh starterkit, but everything works as expected there.

Then I tried to narrow down where the error comes from:

  • disabling all plugins
  • removing all page models
  • creating a page method with a Uuid and an appendix and calling it instead of page.uuid in the template

Nothing worked. The error persists and I don’t know where to look further.
I am grateful for any ideas, what I could try next.

Please post the blueprint with this method

And which Kirby version are you using?

sections:
  fields1: 
    type: fields
    fields:
      test:
        type: info
        text: "{{ page.uuid }}"

I’m using Kirby 3.8.3.

Strange thing is, it seems to be enough that the page.uuid (or also page.uuid.id) is present anywhere in the blueprint – i.e. in an info field, in the help: prop of any other field and even as a data argument in Bnomei’s Janitor Plugin:

button_copy_id:
  type: janitor
  command: 'janitor:clipboard --data {{ page.uuid.id }}'
  label: 'Copy Page ID to Clipboard'
  progress: Copied!
  icon: copy

I could reproduce the problem in my not so fresh Starterkit, just surprised that you couldn’t. Need to test later tonight in a fresh kit.

To me, that smells like a bug.

Thanks for checking. It is not urgent to me, just kept bugging me…

Hi @texnixe
the error didn’t show in my starterkit because I forgot to set

`languages' => true

in the config, as in my main project.
If set, the error shows in a fresh starterkit.

As I now know how to reproduce the error, would it be of help if I filed an issue on github?

Yes, please. My Starterkit is multilang as well-

1 Like