If you have a Content Type with a Paragraph that contains an Entity Reference field to Content, it causes a crash in the View. I want to be able to filter by a dropdown list of Titles from that referenced content.

Comments

Coufu created an issue. See original summary.

coufu’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new2.94 KB

I fixed it. Before, it would only work with users, nodes, and taxonomies. Now it also works with content references within paragraph revisions.

I refactored the code to work more universally. Instead of a "switch" to work on a limited set of entity types, it uses an explode("__", ...) to pull the left side of the __ to see what kind of entity it is. I think this refactoring will help in the long run, but please correct me if I'm wrong. It definitely works for my purposes.

Enjoy!

coufu’s picture

Status: Patch (to be ported) » Needs review

Changing status to Needs review. I chose the wrong status in my last comment.

  • el1_1el committed 22ff3c2 on 8.x-1.x authored by Coufu
    Issue #2905502 by Coufu: Does not work on a content reference field...

el1_1el credited el1_1el.

el1_1el’s picture

Status: Needs review » Patch (to be ported)

Thanks Coufu. This works very nicely. I'm committing to dev

el1_1el’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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