I ran in to a strange issue with an Entity reference fields on nodes and the more I think about it, the more I think this might be a useful feature in this module to avoid potential disasters.

I have a node type with an entity reference field that references nodes of the same type and renders them when viewing the node. If the node references itself, an infinite loop occurs because the node renders itself, which renders itself, and so on..

I couldn't find any reported issues about this, but my apologies if this has already been reported.

Do you think a validation should be added to prevent an entity from referencing itself? I can't think of any possible use-case where that would be desired..

Comments

Amir Simantov’s picture

Status: Active » Closed (duplicate)