getkirby / starterkit

Kirby's sample site – the easiest way to get started with Kirby
https://getkirby.com
176 stars 52 forks source link

Replace site.find() with kirby.page() #2

Closed texnixe closed 5 years ago

texnixe commented 5 years ago

This PR replaces the current way to find a page (site.find()) with kirby.page() to prevent errors in the Panel in case the parent's status is changed to draft.

While this might not always make sense, it probably does in the Starterkit context where people play around and where they otherwise don't have a chance to get back to the original state because the resulting error prevents the user to change the status back to published.