Closed n-kort closed 1 year ago
I cannot reproduce this issue in the Starterkit with the steps you explained.
Is the missing colon (page//
instead of page://
) a typo or is this the actual code you used? In this case, please ensure you add the colon, otherwise the page lookup won't work.
Hmm, no the colon I guess was irrelevant since the IDs were mainly coming from structured fields... but I can't reproduce it again either 😬 I must have changed something else or misidentified the source of that error.
Thanks for looking into it @lukasbestle, I'll close and test more in Starterkit if it crops up again!
Description
Using
page('page//example-uuid')
, or$field()->toPage()
on paged templates results in this error:I'm using a structured field for menu settings in the
site.yml
, and when trying to loop through it in the template this happens. Specifically, any URL with/page:[n]
after it.While investigating I tried changing the 'url' settings in the config.php, turns out this happens when
'url' => '/'
, which I had set as a fix for mixed content warnings on the server.Expected behavior
The methods should work the same on
/news
and/news/page:2
etc etcTo reproduce
'url' => '/'
in your configpage('page//any-uuid')
to a template/news/page:2
Your setup
Kirby Version
3.8.2 php 8.1