govCMS / GovCMS8

Current stable release of the main GovCMS8 distribution.
GNU General Public License v2.0
60 stars 58 forks source link

Allow book module to handle unpublished content #463

Open KatieAK-enviro opened 4 years ago

KatieAK-enviro commented 4 years ago

Problem

We (Department of Agriculture, Water and the Environment) have sites using the book module to create longform reports, which allows us to take a digital first approach to content that would have traditionally been published as large pdf files.

The book module doesn't currently allow unpublished "books" or "book pages" to be used in the book hierarchy. This makes it impossible to effectively prepare a full report in an unpublished state; which means our content approvers can't see what the finished product will look like before approving content. This is a problem in a Goverment publishing workflow, where embargoed content needs to be prepared ahead of time and only published once approved and generally on a designated launch date.

Solution

Our development partner has investigated and found that this issue has been patched: https://www.drupal.org/project/drupal/issues/26552

Belhendo commented 4 years ago

Thank you for your suggestion @KatieAK-enviro.

We would look for this in a stable release rather than a patch. As a suggestion, your dev partner could have a conversation with the maintainer on Drupal.org to help expidite this process.

simesy commented 4 years ago

The issue on Drupal.org was created in 2005, the year I started doing Drupal. I agree there would be only one or two sites that need this, so it's not an ideal patch for the distribution, as it's not a simple patch.

For the record, I want to flag that the PaaS scaffold allows patches to be applied on a site-by-site basis and if this strategy ever reached SaaS then there would be a mechanism for the helpdesk solve this problem for just the site in question (not saying it would be ideal, but worth mentioning).

KatieAK-enviro commented 4 years ago

Thankyou for looking into this. The Department does not currently have the capacity to fund our development partner to work with the maintainer to resolve this issue. I'd be curious to understand how other GovCMS sites that use the book module work around this; as it adds significant complications to our publishing workflow.

simesy commented 4 years ago

It's quite possible that no saas sites are using book module as extensively as you are, govcms team can answer that for sure.

simesy commented 4 years ago

If I needed to solve this on a SaaS site, here is the way I might solve it. I'm putting this here not because it's quick and easy or even wise, but because it would be way less effort than helping a 15 year old issue get merged to Drupal. Technical jargon follows.

  1. Add a new field to the book pages something like field_hide. It will be a check box.
  2. In the preprocess for book pages, check if field_hide is set, and if so return a 404.
  3. From now on publish all pages.

There are a number of side effects of doing this and it should not be done on a whim. There will be a number of places where you need to preprocess to hide content from these pages.

Belhendo commented 4 years ago

Hi @KatieAK-enviro

Apologies for the delay in responding, I have just returned from leave.

Thanks @simesy for your contribution in this issue.

Unfortunately, GovCMS doesn't have the resources to progress functionality within modules. I can offer some other options:

  1. Active/Standby could be an option
  2. You could ask your question on Discourse and the govcms community to seek wider input/discussion
  3. You could raise a service desk ticket and our support team can provide you with options for handling embargoed content. A draft function is not recommended for embargoed content.

Hope that's helpful.