Call to a member function getType() on views pages

Created on 6 October 2021, about 3 years ago
Updated 8 May 2024, 8 months ago

Problem/Motivation

After updating my site to Drupal 9.2.7 and Field inheritance 2.0.x-dev I got a fatal error on all views pages using inherited fields.
Error: Call to a member function getType() on null in Drupal\views\Plugin\views\field\EntityField->defineOptions() (line 378 of core/modules/views/src/Plugin/views/field/EntityField.php).

Proposed resolution

Using a newer version of views computed field patch resolves this issue for me.

I used the changes of core/modules/views/src/Plugin/views/field/EntityField.php from https://www.drupal.org/files/issues/2021-01-30/drupal-computed_bundle_ba... instead of https://www.drupal.org/files/issues/2019-10-20/2981047-fix-only-44.patch

The difference is the iteration over the bundles I think. Is it possible to change the patch in composer.json to either this patch version or one without the tests that only fixes the error in EntityField.php?

🐛 Bug report
Status

Postponed

Version

2.0

Component

Code

Created by

🇩🇪Germany Daniel_Rempe Bochum

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