I tried to use this module to create "series of events" (the main event can contain multiple sub-events). The problem is, that I get Memory exhausted or Maximum execution time exceeded every time, when I try to edit or add node of the same type (I tried it with different content type and it works without problems).

I use last dev versions of everything (Drupal, Entity API, Entity Reference and Inline Entity Form.

Comments

bojanz’s picture

Priority: Critical » Normal

Well of course you can't do that, because you create an infinite loop (an event has an IEF for subevents, the subevent has an IEF for sub-subevents, and onwards to infinity). We should add some code to prevent recursion, and document the limitations.

bojanz’s picture

Title: Memory exhausted or Maximum execution time exceeded when referencing the same content type » Referencing the same entity type / bundle as the parent entity leads to recursion
Status: Active » Fixed

Pushed a quickfix.

The "single" widget will just return nothing if it detects that the parent entity_type / bundle are the same as the inline one.
There is nothing we can do to support recursion in this case.

The multiple widget can be smarter. I've added code so that the "add" form is not automatically opened in this case, avoiding the recursion problem.
However, it will still fail to work because of #1835852: Multiple same-entity add/edit forms on one page results in duplicate DOM Id's so let's move over there.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.