Default (current) revision can be hidden in generic revision ui

Created on 14 September 2023, 9 months ago

Problem/Motivation

While playing around with translations and revisions to start work on πŸ› Revision UI reverts all language translations when only one language is reverted Active I found a bug when creating revisions of blocks in Umami.

If I edit a block and save a new revision without changing anything else on the form, the revision is saved with the revision_translation_affected flag set to NULL. However, if this block is not controlled by Content moderation (or some other means or forcing revision_translation_affected to TRUE) then that new revision is now the current revision, but doesn't show in the revision overview screen for the block because ->isRevisionTranslationAffected() returns FALSE.

Steps to reproduce

  1. Install demo_umami profile
  2. Go to /en/admin/content/block/1
  3. Change nothing at all on the form, except tick "Create new revision (all languages)" under Revision information.
  4. Save
  5. Go to the Revisions screen for either language (/en/admin/content/block/1 or /es/admin/content/block/1)
  6. Notice there is only a single row, and the Revert and Delete links are present.
  7. Notice there is no Current revision row

Proposed resolution

Potentially update this line to check isDefaultRevision() too?

I don't really know the ins and outs of revision_translation_affected though, maybe this is expected behaviour?

NodeController::revisionOverview doesn't seem to do anything special here either so I'm not sure.

Remaining tasks

Confirm what's expected
Confirm fix
Tests

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¦πŸ‡ΊAustralia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024