OgMembership does not define a label entity key nor override EntityBase::label(), so it returns NULL
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3573327. --> Reported by: [alorenc](https://www.drupal.org/user/3603980) Related to !69 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When a bulk action is denied on an OG membership (e.g., unblocking an already active member), BulkForm::viewsFormSubmit() formats an error message using $entity-&gt;label(), passing NULL to Html::escape() via FormattableMarkup::placeholderEscape(), resulting in:</p> <p>TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type strng, null given</p> <p>See <a href="https://git.drupalcode.org/project/drupal/-/blame/11.3.3/core/modules/views/src/Plugin/views/field/BulkForm.php#L425">https://git.drupalcode.org/project/drupal/-/blame/11.3.3/core/modules/views/src/Plugin/views/field/BulkForm.php#L425</a></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Override label() in OgMembership to return the owner's display name, falling back to the entity ID</p>
issue