Keeping track in which field the reference is made

Created on 30 April 2025, 14 days ago

Hello. Nice work on this module, thanks!

It covers almost all use-cases I have, besides 1: the users on my project are interested in which field an entity is being referenced. As far as I can see, this isn't being tracked currently.

Do you see this feasible within the current module's architecture or is this something the module will never support?

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium rp7

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

Comments & Activities

  • Issue created by @rp7
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    The goal was to keep the table as compact as possible and I didn't see any reason to store also the fields. Probably, if we do, we should store also in the JSON field but is that worth it? Right now I don't see a use case

  • 🇧🇪Belgium rp7

    Just putting my use-case out here: we have a few big content types with a lot of fields and nested paragraph structures. Content comes and goes (unpublish) quite frequently. Before our users unpublish content, they want/need to verify if it's not actively being used (referenced) anywhere. It makes life a lot easier for them to immediately see from which field the other entity is referencing. It's more or less a "killer" feature for them.

  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    Thinking more... with the current architecture is not possible because an entity might refer the same target via 2 different fields:

    node(nid456) -> field_term -> taxonomy_term(tid123)
    node(nid456) -> field_other_term -> taxonomy_term(tid123)

    But currently, we only store once the relation between node(nid456) and taxonomy_term(tid123). We don't care which was the field, we're only interested if the relation exists. But did you try https://www.drupal.org/project/entity_usage , that stores also the fields

  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    We can add a hook somewhere, so a third party might do whatever they want, including storing more info somewhere

Production build 0.71.5 2024