Disable Draft Status

Lets see if I stumbled on a bug or if this is the intended behaviour.
I’m setting up the blueprint for the homepage of a site and I’m trying to configure the status

If I use this

status:
    draft    : Draft
    unlisted : Unlisted
    listed   : Published

Everything works as expected

But if I try to disable the draft and only allow for listed/unlisted like this

status:
    unlisted : Unlisted
    listed   : Published

Then the draft is back with also the extra help text

So the question is: Is there a way to allow users to switch status between listed unlisted without allowing a page to be set as draft?

1 Like

You can’t disable the draft state. All pages are always created as drafts first. Are you using a hook to set a listed or unlisted state on page creation?

No I was trying to find a way to prevent users to set the homepage as draft

Why don’t you just set changeStatusto false? Doesn’t really make sense to switch between published and listed for the home page.

On my site visible pages are displayed in a list in the footer.
So if you want a page to be displayed there you simply change the status to visible.

Worked flawlessly on K2.

Now in K3 i have this draft variable added to the mix.

Also, doesn’t make much sense to be able to set the homepage of the site as draft :smile:

It doesn’t even work to set the home page as a draft. So yes, the option shouldn’t even be visible for the homepage. Could you file an issue, please?

For all other pages, you wouldn’t be able to create pages if there was no draft state.

Could you file an issue, please?

Absolutely. Doing it now.

As for this:

For all other pages, you wouldn’t be able to create pages if there was no draft state.

This is another issue and I think there could be a solution (for example allow the possibility of creating pages with the desired status as default) but it’s not that important right now :wink:

…or, if we had the ability to programatically override blueprint options, you could use a page.create:after hook to change the status of the page after creating it, even if in its blueprint you had set its changeStatus: false.

Although useful this wouldn’t really solve my problem because my main issue is with pages that are already there such as the homepage.

You could just hide this option with css

Unless I’ve overlooked something, I don’t think you can do that just for that single page, you’d hide the draft option from every single page.

You are right. I keep forgetting that I am using this plugin: Kirby 3: Panel View Extended

Yep, that’s a different story. However, it would just be a workaround while the issue that the draft option exists when you can’t make the home page a draft page, persists.

This is fixed on RC 3.0.1 and will be in the next release.