Problem/Motivation

I have a moderation workflow that has the states: Draft, Under revision, Published. The content is unpublished until it the moderation is changed to Published state.

Sometimes the editors in my team need unpublish a content that has already been published. They change it to Under revision or Draft because they want to hide it from anonymous users or to be hidden from the public site but it is still available to everyone. If they try to remove it from publication from the content table (/admin/content) it doesn't allow them to.

I read here: https://www.drupal.org/project/drupal/issues/3100781 that it is by design and that is ok for a regular use case but sometimes the content needs to be actually hidden from the site. So my question is how to unpublish and hide a node without leaving a public version. Is there a step I'm missing?

The workflow in my site is configured as:
Draft: Unpublished. Users in the content creation role can create content but just save it as Draft.
Under revision: Unpublished. Users with editor role can review and edit the content and change it to Published or return to Draft.
Published: Published. The content is available to everyone and published in the site.

Steps to reproduce

1. Configure a moderation workflow with unpublished and published states.
2. Create a content and save it with a moderation state.
3. Save the content as the published state.
4. Try to return it to an unpublished state but the content is still published.

CommentFileSizeAuthor
#5 workflow-draft-unpublish.jpg53.98 KBredzeuf

Comments

myst123 created an issue. See original summary.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

wweibel’s picture

I am having this exact use case as well. There are times when content needs to be completely obfuscated from end-users. Whether by design or not, this is a valid case that should be addressed; especially since under 'traditional' content publishing in Drupal this is what would occur with only the 'published' check box.

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)
Related issues: +#2917296: published content cannot be unpublish

I think this may be a duplicate of #2917296: published content cannot be unpublish, and there is some information on that issue. Please verify.

redzeuf’s picture

StatusFileSize
new53.98 KB

It seems like that's the design of this module by default. There is two defaults states "Draft" and "Publish" that we cannot modify from the admin. The draft behaviour don't switch to the last revision you create when you change the state, it means that you can work on a draft and stay with the previous version published. Then when your new draft is ready you can publish it to replace the one online (this publish mode do a switch on this last version of your content.

If you want to unpublish a content , you have to create a new state for exemple "Draft unplished" and you check the checkbox "Default revision" like in the following screenshot and you keep unchecked then "Published status". It should do the job.

Worfkflow unpublish draft

If it works for you, please change this issue with the status "Closed (Work as designed)".

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

jwilson3’s picture

I think what might be missing from your configuration is the "Archived" state which effectively unpublishes a previously published node.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing this out as there hasn't been any movement for a few months.

If still having issues please reopen with what you are seeing.a