- Issue created by @lpeidro
The Entity Mesh module currently doesn't provide a way to identify isolated nodesβthat is, nodes that are referenced by other nodes but don't reference any themselves. It would be very useful to have a statistics table that makes it easy to identify these nodes. Additionally, the table should show how many nodes reference a specific node and how many nodes a particular node references. This feature would give site administrators better insights into the content relationships on their site.
The proposed solution is to introduce a new database table to store and manage this statistical information efficiently. This table would track incoming and outgoing references for each node.
A new database table would be created to store the following data:
node type
: The node type.node_id
: The ID of the node being tracked.incoming_references
: A count of how many other nodes reference this node.outgoing_references
: A count of how many nodes this node references.The data in this table will be updated in two key scenarios:
hook_node_insert
, hook_node_update
, hook_node_delete
). This approach ensures the data remains up-to-date in real-time without needing to run the full Entity Mesh process.
This new table would enable the creation of a statistics page or block where administrators can easily see and filter nodes based on their reference counts, including identifying nodes with zero outgoing references (the isolated nodes).
A new page or tab will be added to the Entity Mesh administration section. This page will display the statistics table, showing node titles, incoming reference counts, and outgoing reference counts. The table will be sortable and filterable.
No significant API changes are anticipated, but new functions might be introduced to interact with the new statistics table.
A new database table will be added to store node reference statistics. The specific name and fields for this table will be defined during development.
Active
1.0
Code