Problem/Motivation

EntityReferenceRevisionsFieldItemList:hasAffectingChanges will return FALSE if first referenced item is not changed.

Steps to reproduce

Create Entity with multiple entity reference field:
Entity 1 reference_field:
- Reference Entity 1
- Reference Entity 2
Edit Reference Entity 2 - new revisions for Reference Entity 2 will not be created.

Proposed resolution

src/EntityReferenceRevisionsFieldItemList.php

-        return $entity->getTranslation($langcode)->hasTranslationChanges();
+        if ($entity->getTranslation($langcode)->hasTranslationChanges()) {
+          return TRUE;
+        }
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

artematem created an issue. See original summary.

artematem’s picture

Status: Active » Needs review
berdir’s picture

This should be fixed in dev, I need to do a new release

berdir’s picture

Ah, maybe this is a different issue

pavel.bulat’s picture

Status: Needs review » Reviewed & tested by the community

I had the same issue, and during investigation process I came to the same solution, then I decided to check existing issues for the entity_reference_revisions :) Tested the patch - it works as expected.

  • berdir committed 16b72c36 on 8.x-1.x authored by artematem
    fix: #3582279 EntityReferenceRevisionsFieldItemList:hasAffectingChanges...
berdir’s picture

Status: Reviewed & tested by the community » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

eduardo morales alberti’s picture

Hi!! No release?