Skip to content
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

Custom statuses are not supported #3144

Open
hlashbrooke opened this issue Oct 25, 2017 · 32 comments
Open

Custom statuses are not supported #3144

hlashbrooke opened this issue Oct 25, 2017 · 32 comments
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Focus] Blocks Adoption For issues that directly impact the ability to adopt features of Gutenberg. Framework Issues related to broader framework topics, especially as it relates to javascript [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Enhancement A suggestion for improvement.

Comments

@hlashbrooke
Copy link

Issue Overview

On a site with custom post statuses (on a CPT in this case), the custom statuses are not available anywhere in the Gutenberg UI, so they are are effectively unusable without switching to the classic editor.

Steps to Reproduce

  1. Create custom statuses for a CPT
  2. Notice their absence in Gutenberg
  3. 😭

Using:

  • Gutenberg 1.5.1
  • WordPress 4.8.2
  • Chrome 62.0.3202.62 on Kubuntu 16.04 (although I doubt that's relevant here)

Expected Behaviour

The custom statuses should be available in Gutenberg.

Current Behavior

No custom statuses in Gutenberg.

@ntwb
Copy link
Member

ntwb commented Oct 25, 2017

Related: https://core.trac.wordpress.org/ticket/12706 "Custom post status bugs"

@mtias mtias added the [Feature] Extensibility The ability to extend blocks or the editing experience label Jan 4, 2018
@gziolo gziolo added Framework Issues related to broader framework topics, especially as it relates to javascript [Priority] High Used to indicate top priority items that need quick attention [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Feb 1, 2018
@gziolo
Copy link
Member

gziolo commented Feb 1, 2018

Related #2457.

@gziolo gziolo removed the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Feb 1, 2018
@danielbachhuber
Copy link
Member

Just so it's explicitly stated: WordPress doesn't have a formal API for custom post statuses, so that may hinder the eventual implementation.

@danielbachhuber danielbachhuber added this to the WordPress 5.0 milestone Apr 11, 2018
@davisshaver
Copy link
Contributor

davisshaver commented Apr 20, 2018

This came up in editorial testing. Using PublishPress.

feedback

@danielbachhuber
Copy link
Member

Also related WP-API/WP-API#1820

@danielbachhuber
Copy link
Member

I've documented this issue in the migration guide.

@danielbachhuber
Copy link
Member

Moving this to WP 5.1 Onwards. We'll need to decide upon the formal API for custom post statuses before Gutenberg can support this.

@skorasaurus
Copy link
Member

skorasaurus commented Jan 7, 2019

Would also love to see this implemented; lack of custom statuses in Gutenberg is a dealbreaker for our organization and many other organizations, I imagine.

We are working towards using custom statuses to label and organized content so it can then be improved and edited by multiple parties (the original writers, copy editors, someone else to review it for accessibility, correct any image formatting, SEO, etc) before it is finally published publicly.

I'm interested to hear how other sites who are using pressbooks, publishpress, Editflow, and Oasis-Workflow, are dealing with this.

(Written as a CPL employee)
(2022 Update: we ended up having to go around this by the Revisions plugin in WordPress)

@greatislander
Copy link
Contributor

greatislander commented Jan 7, 2019

@skorasaurus 👋 I'm from @pressbooks. We talked about this a bit in the core REST API chat last week. I'm going to do a bit of digging into the history around custom statuses and propose a path for formal support in core, which my help move this issue forward.

@mikelking
Copy link

Curious has anyone made any progress on this in the last 6 months?

@benlk
Copy link
Contributor

benlk commented Jun 26, 2019

The Edit Flow plugin updated with Gutenberg support, according to https://wordpress.org/plugins/edit-flow/#developers, so I'm assuming that something was done. @rinatkhaziev would know more.

@greatislander
Copy link
Contributor

Their implementation is here: https://github.com/Automattic/Edit-Flow/blob/master/blocks/src/custom-status/block.js

I left my previous job at the end of February and so I haven't followed up on this as it's not a priority for my new job. Sorry for dropping the ball.

@mikelking
Copy link

Thanks everyone for responding. Glad to see it's not dead yet. 😺

@paaljoachim
Copy link
Contributor

@hlashbrooke @imath @leorospo or anyone else.
Can we get a status update for this issue?
Thanks!

@TimothyBJacobs
Copy link
Member

TimothyBJacobs commented May 26, 2020

This is still waiting on custom post statuses in core, https://core.trac.wordpress.org/ticket/12706, and then support in the REST API.

@paaljoachim
Copy link
Contributor

I suggest that we close this issue until there is an opening in core. We can at that time reopen this issue. Does that sound ok?

@iandunn
Copy link
Member

iandunn commented May 27, 2020

What about adding the [Status] Blocked label instead, since it's still a problem that users are experiencing?

@paaljoachim paaljoachim added the [Status] Blocked Used to indicate that a current effort isn't able to move forward label May 27, 2020
@annezazu annezazu added the [Focus] Blocks Adoption For issues that directly impact the ability to adopt features of Gutenberg. label May 18, 2022
@Mte90
Copy link

Mte90 commented Jun 9, 2022

it is surprising after 5 years of the release this support for something that is in wordpress since more years is not available in gutenberg and block the plugin development to invent other solutions...

@mgurtzweiler
Copy link

it is surprising after 5 years of the release this support for something that is in wordpress since more years is not available in gutenberg and block the plugin development to invent other solutions...

It is disappointing and makes for some difficulties running a large publishing site on WordPress. We keep running into issues with floating publish dates not being respected (even know its an option on the register function https://developer.wordpress.org/reference/functions/register_post_status/) so posts end up being published in the past as the Publish Date gets set when a post is moved to a custom status.

@lkraav
Copy link

lkraav commented Dec 7, 2022

Is there an established system to crowdfund a block editor PR like this yet?

@mediaformat
Copy link
Contributor

@lkraav Just learned of this one https://wptavern.com/the-wp-community-collective-launches-nonprofit-to-fund-individual-contributors-and-community-based-initiatives

@Mte90
Copy link

Mte90 commented Dec 7, 2022

Just doing the code patch is not enough if no one review the code and approve it. In WordPress usually that one is the problem with code contribution.

@lkraav
Copy link

lkraav commented Dec 7, 2022

Just doing the code patch is not enough if no one review the code and approve it. In WordPress usually that one is the problem with code contribution.

For sure, but review+ phase is usually the smaller part of the problem, for anything other than one/two-liner fixes.

@tomjn
Copy link
Contributor

tomjn commented Dec 7, 2022

Does the REST API have a mechanism for listing the available statuses? EditFlow registers its own list at window.EditFlowCustomStatuses to work around this.

Without exposing that information via the API there's no way for the block editor to know about custom statuses and present them as an option to the user, or to understand what their impact on the block editors UI should be. This also delves a little into the long open question about how custom statuses should work in WordPress on the PHP side.

Once that problem has been solved, then proper block editor support would be possible.

To reiterate, open problems:

  • the REST API does not list the custom statuses a post type can have, and who can set them, which needs solving in core
  • the block editor wouldn't know what to do to the UI, in particular the ability to publish/update/save/draft/preview for that status

@mattradford
Copy link

mattradford commented Dec 7, 2022

Hey @tomjn, thanks for commenting.

The REST API has support for retreiving statuses: https://developer.wordpress.org/rest-api/reference/post-statuses/
The controller uses get_post_stati() to get status, which should include anything registered with register_post_status() (I haven't tested that).

The REST API also has support for retrieving post types: https://developer.wordpress.org/rest-api/reference/post-types/ but does not include statuses that a post type supports. That could be added when the item is prepared for response using get_available_post_statuses().

I'm happy to add status support to post type response if someone else can tackle the thornier block editor side of things.
Edit: I see @imath already has a PR that implements some of this.

@bph
Copy link
Contributor

bph commented Jul 16, 2024

@ntsekouras I am wondering if this issue can be closed with #63293 merged? And if it should stay open, what would the next steps be? Or is it part of a larger tracking issue?

@ntsekouras
Copy link
Contributor

@ntsekouras I am wondering if this issue can be closed with #63293 merged? And if it should stay open, what would the next steps be? Or is it part of a larger tracking issue?

It should stay open and see how to retrieve custom status through REST API (based on the above comment) and update the UI and logic we have for statuses to handle them properly.

@talldan talldan removed this from the WordPress 5.x milestone Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Focus] Blocks Adoption For issues that directly impact the ability to adopt features of Gutenberg. Framework Issues related to broader framework topics, especially as it relates to javascript [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Enhancement A suggestion for improvement.
Projects
Development

No branches or pull requests