EntityUsage::listTargetEntitiesByFieldAndMethod() does not correctly respect source_langcode when usage rows exist for multiple revisions/translations of the same source entity. The parameter is required in the function signature, but it is never used in the query logic.

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

gugalamaciek created an issue. See original summary.

gugalamaciek’s picture

Title: Entity usage: listTargetEntitiesByFieldAndMethod() ignores source_langcode and returns inconsistent targets » EntityUsage::listTargetEntitiesByFieldAndMethod() ignores source_langcode and returns inconsistent targets
Issue summary: View changes

gugalamaciek’s picture

Assigned: gugalamaciek » Unassigned
Status: Active » Needs review
alexpott’s picture

Great spot.

  • alexpott committed da913ac4 on 5.x
    fix: #3582420 EntityUsage::listTargetEntitiesByFieldAndMethod() ignores...

  • alexpott committed bc74a31c on 8.x-2.x
    fix: #3582420 EntityUsage::listTargetEntitiesByFieldAndMethod() ignores...
alexpott’s picture

Status: Needs review » Fixed

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.