Error message when creating new pages: A draft with the URL abbreviation "xyz" already exists

I’ve just noticed that when I create new pages, I get an error message saying that a draft with the URL shortlink already exists. However, this is not true. The message also appears with fantasy names.

If I click on ‘cancel’ and reload the panel, the new page appears under the drafts.

I haven’t created any new pages in the panel for some time, so I can’t trace back to when the error existed.
Also, I am using the same plug-ins and config.php settings as in another existing installation. Therefore, it is difficult for me to find the cause.

Also, this area from the blueprint is identical to the working installation:

  label: "Entwürfe ({{ page.drafts.count }})"
  type: pages
  status: draft
  info: "{{'d.m.Y') }}"
  sortBy: title asc
    query: page.cover.toFile
    cover: true
    back: black
    - default
    - produkt
    - branche
    # The error message also appears if I omit the predefined templates.

Why is there no template selector although in your blueprint section you allow multiple templates? As if the section you are showing is not the one responsible for the page you’re trying to create

Well recognized, I had not paid attention to this in the uplaod.
The screenshot comes from another page area where only one template is defined.
In general, however, the error message runs through all pages where new pages can be created.
Here is the screenshot of the blueprint code example shown above:


  • The error is displayed locally (MAMP) and on the web server.
  • Only the UUID is contained in the .txt of the new draft:
    Uuid: FKaCHYcq6pYyviwt

Hm, looks as if the page is created and then Kirby tries to create it again, for whatever reason. Are you using the latest Kirby version?

Are you using any hooks that do stuff after page creation?

And can you reproduce this in a fresh Starterkit?

I was able to locate the error or trigger: Statistics are displayed on every page in the panel. I had extended this with the UUID. If I delete the line, I can create new pages again. What is wrong with this line and what should it be called correctly?

label: 'Statistik für "{{ page.title.value ?? page.slug }}"'
type: info
text: |
  - **Änderungsdatum:** {{ page.modified('d.m.Y') }} | {{ page.modified('H:i') }} Uhr
  - **Blueprint:** {{ page.intendedTemplate }}.yml 
  - **Template:** {{ page.template }}.php
  - **unique ID:** {{ }} # <--- THIS LINE IS THE CULPRIT
  - **übergeordnete Seite:** {{ page.parent ? page.parent.title : 'keine' }}
  - **Unterseiten: ** {{ page.childrenAndDrafts.isNotEmpty ? page.childrenAndDrafts.count : 'keine' }}
  - **hochgeladene Fotos:** {{ page.images.isNotEmpty ? page.images.count : 'keine' }}
theme: positive

Ok, that explains it, see issue page.uuid cannot be used in blueprint definitions in multi-lang setups · Issue #4955 · getkirby/kirby · GitHub

Happy New year :confetti_ball: