Problem/Motivation

In case patch in EntityReferenceFieldItemList::referencedEntities should return the translated entity is used, then it leads to an error when using err as follows,
Fatal error: Declaration of Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList::referencedEntities() must be compatible with Drupal\Core\Field\EntityReferenceFieldItemList::referencedEntities(?string $langcode = NULL) in /var/www/html/web/modules/contrib/entity_reference_revisions/src/EntityReferenceRevisionsFieldItemList.php on line 21

Steps to reproduce

Apply patch in - https://www.drupal.org/node/2915972
Try to visit a form where ERR fields is used.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

D34dMan created an issue. See original summary.

d34dman’s picture

I have trouble pushing the commit via git... so here is the patch

mkrizaj’s picture

StatusFileSize
new1.56 KB

Hey,

You've missed adding logic to load a translatable entity, so I am adding a new patch.

Thanks,
Matic

mkrizaj’s picture

StatusFileSize
new4.74 KB

Adding fixes for drupal coding standards.

mkrizaj’s picture

StatusFileSize
new585 bytes

Attaching new patch for latest version.

chetan 11 made their first commit to this issue’s fork.

chetan 11’s picture

Status: Active » Needs review

please check the above MR.

d34dman’s picture

@mkrizaj,

The patch in #5 is same as the one posted in #1, could you explain why?

berdir’s picture

Status: Needs review » Postponed
andreadruiz’s picture

Hi all, I am adding the same patch but compatible with 8.x.1.x version. Thanks!