luca
December 14, 2022, 9:50pm
1
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.
texnixe
December 14, 2022, 10:00pm
2
Please post the blueprint with this method
And which Kirby version are you using?
luca
December 14, 2022, 10:03pm
3
sections:
fields1:
type: fields
fields:
test:
type: info
text: "{{ page.uuid }}"
I’m using Kirby 3.8.3.
luca
December 15, 2022, 3:05pm
4
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
texnixe
December 15, 2022, 4:12pm
5
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.
luca
December 15, 2022, 4:38pm
6
Thanks for checking. It is not urgent to me, just kept bugging me…
luca
December 16, 2022, 4:54am
7
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?
texnixe
December 16, 2022, 8:43am
8
Yes, please. My Starterkit is multilang as well-
1 Like