Problem/Motivation

The diff module allows to display changes across revisions, and optionally allows it visually. In that situation the ContentBlockTitleReplacementFormatter won't match with any of the supported routes and will display the default text "Placeholder for replacement title"

Steps to reproduce

- Install the diff module
- Configure the diff module to display the layout "Visual inline"
- Create a node from a content type supporting revisions and layout builder (a page for example)
- Go to layout builder and do some changes
- Go to layout builder and do some changes again
- Go to the revisions tab
- Click on "Compare selected revisions" button

Proposed resolution

- Add a new condition to the switch case at \Drupal\rocketship_core\Plugin\Field\FieldFormatter\ContentBlockTitleReplacementFormatter::viewElements to support the diff.revisions_diff route

Remaining tasks

- Create a patch
- Review
- Test

User interface changes

- None

API changes

- None

Data model changes

- None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

akalam created an issue. See original summary.

akalam’s picture

Status: Active » Needs review

nginex made their first commit to this issue’s fork.

  • 8db1416 committed on 6.x
    Issue #3308574: Add support for the diff module to the src/Plugin/Field/...
  • a689fe8 committed on 6.x
    Issue #3308574: Refactor and optimise code for title formatter.
    
nginex’s picture

Version: 6.0.0-alpha38 » 6.x-dev
Status: Needs review » Fixed

Thanks for the patch, I've refactored some related code and removed duplicate of code.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.