Closed texnixe closed 5 years ago
This is a logical issue and not really a "bug". site.find
does not find drafts. In versions prior to 3.2 no error was thrown, but this would still have led to an empty section. In 3.2. the error is new, but it just shows the same problem more clearly. I have no direct solution for this yet, than to replace site.find
with kirby.page
or site.findPageOrDraft
I'm aware of that just wondering if we should adapt the Starterkit/documentation accordingly.
Let's close this here and I open a new one in the Starterkit.
Describe the bug Probably related to #1893, but the Panel throws an error when setting the parent of a pages section to
site.find('somepage')
andsomepage
is a draft. Doesn't happen with a published page in my setup.Example:
To Reproduce Steps to reproduce the behavior:
photography
ornotes
page and change the status to draftThis does not happen if the parent query is changed to
site.childrenAndDrafts.find("photography")
. I haven't tested if this issue existed before 3.2, maybe it's not a bug but expected behaviour after all (but then we should probably be more careful in the docs or in the setup of the Starterkit).What is worse, the status of the page cannot be changed back to published after this happens.
Expected behavior The subpages should still be displayed and no error be thrown as a draft should be allowed to have subpages.
Kirby Version 3.2.0
Console output If you are working with the panel, please check the browser console for errors and send the output.