Problem/Motivation
When viewing node revision I get the following error:
TypeError: Argument 1 passed to Drupal\Core\Entity\EntityRepository::getTranslationFromContext() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /var/www/html/docroot/modules/contrib/rocketship_core/src/Plugin/Field/FieldFormatter/ContentBlockTitleReplacementFormatter.php on line 157 in Drupal\Core\Entity\EntityRepository->getTranslationFromContext() (line 93 of core/lib/Drupal/Core/Entity/EntityRepository.php).
Steps to reproduce
I think the problem exists for Drupal 9.3 and above.
Go to the detail page of any node revision with the title inline block.
Proposed resolution
node_revision is now a revision object when getting it from the route. Let's add an extra check.
Issue fork rocketship_core-3292138
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:
Comments
Comment #3
nginex CreditAttribution: nginex at Dropsolid for Dropsolid commentedComment #5
nginex CreditAttribution: nginex at Dropsolid for Dropsolid commentedThe patch fixes the issues on revision detail page.