Problem/Motivation

When creating content in, say, the 'Draft' state, there is no 'latest version' tab (which makes sense). However, since the 'latest version' tab is where the moderation form is located, there is no way to moderate a piece of content that doesn't have a forward revision (eg, has never been published).

Steps to reproduce

  1. Enable workflow/moderation for article nodes
  2. Create a new article in 'draft'
  3. Note there is no tab from which to moderate this entity
  4. Publish the article
  5. Add a new draft of the article, there is now a 'latest version' tab

Proposed resolution

Either dynamically rename the 'latest version' tab to moderate depending on circumstances (eg, if the entity has no latest version, but is also unpublished, then call it 'moderate'), or add a separate tab/controller that appears when the latest version tab makes no sense.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom created an issue. See original summary.

jhedstrom’s picture

Issue summary: View changes
jhedstrom’s picture

Status: Active » Needs review
FileSize
5.57 KB

This takes the approach of dynamically altering the tab title depending on circumstances. It seemed much more efficient than an entirely new route. It changes some assumptions that were in place, so some tests will probably break, and this new functionality will need explicit tests. Uploading now for early feedback on the approach.

Status: Needs review » Needs work

The last submitted patch, 3: 2870484-03.patch, failed testing.

jhedstrom’s picture

Category: Bug report » Feature request
Status: Needs work » Needs review
FileSize
4.61 KB
10.18 KB

This gets the tests passing, and adds coverage for the change in behavior. This might be more of a feature request, since this behavior was explicitly tested for. However, I'm not sure how folks are moderating content w/o forward revisions...

timmillwood’s picture

I think #2864938: Content moderation form doesn't appear on new entities might solve this issue, but in a different way.

jhedstrom’s picture

Status: Needs review » Closed (duplicate)