New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
page.uuid cannot be used in blueprint definitions in multi-lang setups #4955
Comments
SummaryYou are guessing this problem. Uuid processes start before the page is created (via form class, mentioned below related lines) and the non-existent page is saved with https://github.com/getkirby/kirby/blob/3.8.3/src/Cms/PageActions.php#L539-L543 Also this is working on 3.8.0 but not for 3.8.1.1, 3.8.2 and 3.8.3. |
Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
It's unfortunately a lot more complex than we hoped, but there's a simple workaround for now: info:
type: info
text: "{{ page.content.get('uuid') }}" We are working on getting this fixed permanently in one of the next major versions. |
The same issue happens with |
@mynameisfreedom As workaround you can use like that: {{ kirby.url('base') }}/@/page/{{ page.content.get('uuid') }} Also you use custom page methods: |
You are a Kirby beast @afbora 💪 Thank you, that works 🚀 |
Description
When adding
{{ page.uuid }}
to a blueprint (anywhere, i.e. in thetext
property of theinfo
field or thehelp
property of any field I tried), the add page dialog throws a duplicate error, even though the page slug does not exist. The page is created nonetheless: After cancelling the dialog and refreshing the panel the created page shows.Only happens when
'languages'=> true
is set in config.Expected behavior
Add a new page through pages section in the panel without error.
Screenshots
To reproduce
page.uuid
to page blueprinti.e.
page.uuid
in its blueprintYour setup
Kirby Version
3.8.3
Console output
XHRPOSThttp://starterkit.test/panel/dialogs/pages/create?language=en
[HTTP/1.1 400 Bad Request 29ms]
POST
http://starterkit.test/panel/dialogs/pages/create?language=en
Status
400
Bad Request
VersionHTTP/1.1
Übertragen406 B (145 B Größe)
Referrer Policysame-origin
Anfrage-PrioritätHighest
Your system (please complete the following information)
The text was updated successfully, but these errors were encountered: