How to make a reference on same node without recursion problem Here is the situation.

I have a content type called Product.

Content Type : Product
Title
Body
Color
Product Reference (Entity Reference on content type Product)


Thats mean For a specific product, I could referer this product to more product.

My problem right now is there is a Recursion problem.

Is there any other way to perform my needs.

Thanks a lot
There is no reason you can't have an entity reference field that references the same content type, the problem only comes when you have nodes that reference each other in a loop.

For example if nodes A, B &amp; C have these relations you cause a loop and get the error you describe:

A > B > A
A > C > A
A > B > C > A
A > C > B > C
etc.

If you create your content in a way that avoids loops you avoid the problem, however there is also another work around you can use (which is described at https://www.drupal.org/node/2301499#comment-8973869):


Have a new view mode for your nodes. This could be done in custom code as per the linked example, or by using the Entity View Modes module. 
Configure your entity reference field on the product content type to display using your new view mode.
Configure the display settings for your new view mode on the product content type to not display your rendered referenced entity.


This way when you view a product it will display its referenced entity for that field but that referenced entity will not print out its rendered entity, avoiding the recursion.

That linked issue also has a patch that apparently addresses the issue but the maintainer has said it will never be committed so I would use caution if thinking about using that.