New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add Setting for Default "Published" State of New Entries and Pages #615

Closed
markzegarelli opened this Issue Apr 19, 2016 · 16 comments

Comments

Projects
None yet
9 participants
@markzegarelli

markzegarelli commented Apr 19, 2016

Currently, all new entries and pages default to Published on save. It would be great to have this configurable in the Collection or in the Fieldset.

My team will have several writers and we want to ensure that content is not automatically published before it's been reviewed.

@cschweda

This comment has been minimized.

cschweda commented Sep 28, 2017

+1

This feature would be great to have.

@bacheson

This comment has been minimized.

bacheson commented Dec 5, 2017

this is literally killing my project...I have to create hundreds of empty files with published: false to make this work...fix pretty please

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Dec 5, 2017

This feature request is for the toggle in the editor to default to the off state.
Right now you can just manually toggle it before you hit save. I'm not following what your specific problem is, @bacheson

@bacheson

This comment has been minimized.

bacheson commented Dec 5, 2017

I have hundreds of collection items for ~10 collections....I also have 7 languages....so you are asking me to click almost 1,000 times to set things up

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Dec 5, 2017

I guess I'm not understanding why if you already have hundreds of items, would you need to retroactively unpublish them. What does "setting things up" mean?

@bacheson

This comment has been minimized.

bacheson commented Dec 5, 2017

Sorry let me give you a more detailed example. I have converted my site to Statamic in english-only.

I have ~15 pages

I have ~8 collections; here are the main ones:
blog (80 items)
feature (50 items)
testimonial (50 items)

Now that everything is ready to go I need to convert several main pages of the site to 6 other languages. I'd like to disable everything else for now. This means all the collection items above must have published=false set. Doing this in the cp would take hundreds of clicks.

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Dec 5, 2017

Since the publish state is reflected by a filename starting with an underscore (e.g. _2017-12-01.oh-hai-mark.md) you can use a batch file renaming tool like Name Mangler to do it for you, and it shouldn't take more than a few clicks.

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Dec 5, 2017

I think I understand. You want to create an additional locale but you don't want the English versions to cascade over? You only want them to show up once you add content?

@bacheson

This comment has been minimized.

bacheson commented Dec 5, 2017

yes exactly...i thought about creating a bash script to do this I just wanted to avoid burning an hour or two making sure it worked properly

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Dec 5, 2017

Ok cool. This feature request is pretty different from the issue you're describing.

Maybe open a new one titled "Add option to prevent cascade into additional locales" or similar.
(But to be honest, I don't think that'll happen any time soon).

You might be better off adding something into your template (or create a small addon) that checks if the content of the current locale is different to the default one, and performs a 404.

Shoot us an email support@statamic.com if you want to talk about this more. We're getting off topic here.

@goldnead

This comment has been minimized.

goldnead commented Mar 20, 2018

+1 for this one. Any workaround yet?

@rchlfryn

This comment has been minimized.

rchlfryn commented Apr 4, 2018

+1

@bickle66

This comment has been minimized.

bickle66 commented Jun 18, 2018

Any progress on this FR? It's a bit strange that the default state ISN'T a draft. From a publishing flow perspective.

@edalzell

This comment has been minimized.

edalzell commented Jul 23, 2018

I just got bit by this when I did a save and continue to save my progress. It got picked up by my publish scripts and pushed to twitter and Facebook before is was ready.

@edalzell

This comment has been minimized.

edalzell commented Jul 23, 2018

Thinking about this one a bit more, I think the setting should go in the collection's folder.yaml and not the fieldset.

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Jul 23, 2018

Added for next release (2.10.3)

For entries: add default_status: draft to a collection's folder.yaml

For pages: add it to a folder.yaml at any page directory and it will cascade down to its child pages.
eg. site/content/pages/folder.yaml will affect all pages.
site/content/pages/about/folder.yaml will only affect creating pages in /about/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment