"Draft available" text still appears after deleting a forward revision

Created on 24 February 2020, about 5 years ago
Updated 14 May 2025, 4 days ago

Problem/Motivation

The Draft available state label displays after deleting a forward revision.

Steps to reproduce:

  1. Create and publish a page
  2. Create a forward revision (draft)
  3. Draft available label shows for moderation sidebar text
  4. Delete the draft through the revisions page
  5. Draft available label still displays

This is a caching issue, I don't think there are any contexts or tags we can use for revisions so this will require manual purging.

Proposed resolution

Possibly implement hook_ENTITY_TYPE_revision_delete and purge the entity's cache tags.

Another possible solution would be to add our own cache tag and purge that instead (may be more performant).

Remaining tasks

  1. Agree on approach
  2. Add tests
  3. Add fix
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024