The module overrides Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList with a class that isn't extending the original class

Created on 15 January 2024, 10 months ago
Updated 29 January 2024, 10 months ago

Problem/Motivation

The module overrides Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList with a class that isn't extending the original class. This causes code that does instanceof checks to fail. An example:

TypeError: Drupal\paragraphs_edit\ParagraphLineageInspector::getParentFieldItem(): Argument #2 ($parent_field) must be of type ?Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList, Drupal\entity_model\Field\TranslatableEntityReferenceFieldItemList given, called in [..]/web/modules/contrib/paragraphs_edit/src/ParagraphLineageInspector.php on line 115 in Drupal\paragraphs_edit\ParagraphLineageInspector->getParentFieldItem() (regel 60 van [..]/web/modules/contrib/paragraphs_edit/src/ParagraphLineageInspector.php)

Steps to reproduce

Install the paragraphs_edit module and visit a paragraphs edit page

Proposed resolution

Add an extra TranslatableEntityReferenceRevisionsFieldItemList class.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024