kirby icon indicating copy to clipboard operation
kirby copied to clipboard

page.uuid cannot be used in blueprint definitions in multi-lang setups

Open hariom147 opened this issue 1 year ago • 5 comments

Description

When adding {{ page.uuid }} to a blueprint (anywhere, i.e. in the text property of the info field or the help 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
Bildschirm­foto 2022-12-14 um 22 37 25

To reproduce

  1. install fresh starterkit
  2. enable languages in config
  3. add page.uuid to page blueprint i.e.
fields:
  test:
    type: info
    text: "{{ page.uuid }}"
  1. From pages section create a new page that has page.uuid in its blueprint
  2. See error

Your 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

Cache-Control
	no-store, private
Connection
	keep-alive
Content-Type
	application/json; charset=UTF-8
Date
	Fri, 16 Dec 2022 12:47:36 GMT
Server
	nginx/1.23.2
Transfer-Encoding
	chunked
X-Fiber
	true
X-Powered-By
	PHP/8.1.13
	
Accept
	*/*
Accept-Encoding
	gzip, deflate
Accept-Language
	de,en-US;q=0.7,en;q=0.3
Cache-Control
	no-cache
Connection
	keep-alive
Content-Length
	72
Content-Type
	text/plain;charset=UTF-8
Cookie
	kirby_session=ecafab31991a13734302b2895694415ef3aa09de%2B1672404442.c7760f7f8bf57b3fafc0.f3521b151bc46c42e64d821b8633be831483e8bff171a3caa8e34ab2d2006771
Host
	starterkit.test
Origin
	http://starterkit.test
Pragma
	no-cache
Referer
	http://starterkit.test/panel/site
User-Agent
	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
X-CSRF
	f5784bc2719486f3b79492777f5ba0dffde7c975c0b2ef48ca0d8aa991446ba9
X-Fiber
	true
X-Fiber-Globals
	false
X-Fiber-Only
	
X-Fiber-Referrer
	/site

Your system (please complete the following information)

  • Device: MacBook Pro, 16 inch 2019
  • OS: MacOS 13.0.1
  • Browser: all

hariom147 avatar Dec 16 '22 12:12 hariom147