Fatal error on Drupal 9 : Call to undefined method WebformSubmissionSubmittedToLabel::getEntityTypeManager()

Created on 11 January 2022, about 3 years ago
Updated 10 August 2023, over 1 year ago

Problem/Motivation

On a view done with webform_views, I've got this error on Drupal 9.3

Error: Call to undefined method Drupal\webform_views\Plugin\views\field\WebformSubmissionSubmittedToLabel::getEntityTypeManager() in Drupal\webform_views\Plugin\views\field\WebformSubmissionSubmittedToLabel->getEntityTranslationRenderer() (line 52 of /var/www/project/web/core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php) #0 /var/www/project/web/core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php(76): Drupal\webform_views\Plugin\views\field\WebformSubmissionSubmittedToLabel->getEntityTranslationRenderer()

Looks like this is a remainting call to the old (and removed) entityManager service in the WebformSubmissionSubmittedToTrait. And of course, this is no getEntityTypeManager() method available, as this is yet the getEntityManager() method.

Proposed resolution

Replace the entityManager service with the entityTypeMananer.

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

🇫🇷France flocondetoile Lyon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024