Problem/Motivation
When you open the 'Messages' page of a Mail Group without any messages, the page fails.
TypeError: Drupal\views\Plugin\views\field\EntityOperations::getEntityTranslation(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in /var/www/html/web/core/modules/views/src/Plugin/views/field/EntityOperations.php on line 130 in Drupal\views\Plugin\views\field\EntityOperations->getEntityTranslation() (line 69 of core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php).
Steps to reproduce
- Create a new Mail group
- Open the Mail group's Messages page.
Proposed resolution
Make the 'Message' relationship on the mandatory on the View used to build the page. Thus, there won't be a View results if there are no messages to show.
Issue fork mailgroup-3275650
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
andreasderijckeMerge request created.
It only contains a fix for the View config in the module, no update hook for existing installations.
Comment #6
davisbenThanks for the MR! I added the update hook and merged.