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

  1. Create a new Mail group
  2. 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

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:

Comments

andreasderijcke created an issue. See original summary.

andreasderijcke’s picture

Status: Active » Needs review

Merge request created.
It only contains a fix for the View config in the module, no update hook for existing installations.

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

davisben’s picture

Status: Needs review » Fixed

Thanks for the MR! I added the update hook and merged.

Status: Fixed » Closed (fixed)

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