This plugin allows you to create many-to-many relationships between pages in Kirby and synchronizes them on both sides. Latest version also works with Kirby 4!
MIT License
50
stars
1
forks
source link
Fixing bug with creating relations to draft pages #10
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()
.