Closed pichiste closed 2 years ago
When I attempt to create a relation to a draft page, I get this error:
The problem seems to be the use of page() in index.php, which will only return published pages according to the docs:
page()
index.php
"The page() helper fetches published pages only. To fetch a draft, you have to use $kirby->page('somepage')." Source: https://getkirby.com/docs/reference/templates/helpers/page
The solution seems to be to replace all instances of page() with kirby()->page().
kirby()->page()
Posting here instead of a PR just in case there's some side-effect I'm not thinking of.
Thanks!
Closing this in favor of PR after all
When I attempt to create a relation to a draft page, I get this error:
The problem seems to be the use of
page()
inindex.php
, which will only return published pages according to the docs:"The page() helper fetches published pages only. To fetch a draft, you have to use $kirby->page('somepage')." Source: https://getkirby.com/docs/reference/templates/helpers/page
The solution seems to be to replace all instances of
page()
withkirby()->page()
.Posting here instead of a PR just in case there's some side-effect I'm not thinking of.
Thanks!