This project is not covered by Drupal’s security advisory policy.

Entity Usage Root helps Drupal sites find the top-level content that uses an entity such as a media item, even when references pass through paragraphs or other entities.

Features

The Entity Usage module records direct references, such as a node referencing a paragraph or a paragraph referencing media. Entity Usage Root follows those references through the content structure and records the top-level entities that ultimately use each configured entity.

Use this module when editors, administrators, access-control logic, reports, or Views need to answer questions such as "Which nodes use this media item?" without manually following every intermediate reference.

Features include:

  • Configurable mappings between leaf entities and root entities, such as media to node.
  • Generated entity-reference fields containing the resolved root entities.
  • Automatic updates when referenced content is created, changed, or deleted.
  • Paragraph parent-chain traversal for common nested content structures.
  • Batch and Drush rebuilds for existing content or after tracking data changes.
  • Optional revision creation during bulk rebuilds.
  • Generated administrative Views for configured tracking pairs.
  • Queue processing after tracking configuration changes.

Post-Installation

Enable Entity Usage before enabling Entity Usage Root. After installation, go to Administration > Configuration > Content authoring > Entity Usage Root at /admin/config/entity-usage/root.

Choose which entity types should be tracked as leaves and which entity types should be treated as roots. For example, mapping media to node adds a generated root-reference field to media entities. The module also creates administrative Views for configured mappings when Views is available.

Existing content is not populated automatically on installation. Open the Rebuild tab at /admin/config/entity-usage/root/rebuild and run the initial rebuild. The rebuild can also be run with drush entity-usage-root:rebuild. New content is maintained automatically after installation.

The Entity Usage configuration must track each configured leaf type as a target and each intermediate referencing type as a source. The status report warns when this prerequisite configuration appears incomplete.

Additional Requirements

This module requires:

Views is included with Drupal core and is optional. The module does not require any external PHP libraries or JavaScript libraries.

  • Views URL Alias adds root entity paths and aliases to generated Views.
  • Queue UI provides an administrative interface for monitoring and running the configuration-change queue.
  • Paragraphs is useful when content uses nested paragraph references. It is not required unless the site uses Paragraphs.

Similar projects

Entity Usage records direct, single-hop references between entities. Entity Usage Root builds on that data to resolve multi-step reference chains and store the ultimate root entities for each configured leaf entity.

Supporting this Module

Bug reports, documentation improvements, compatibility reports, and code contributions through the Drupal.org issue queue are welcome.

Community Documentation

The project README contains installation, configuration, rebuild, and integration details. Community walkthroughs, demonstrations, and additional documentation can be linked here as they become available.

Supporting organizations: 

Project information

Releases