Fatal error: Maximum function nesting level of '256' reached, aborting!

Created on 8 January 2019, almost 6 years ago
Updated 7 August 2023, over 1 year ago

In follow-up of this issue: https://www.drupal.org/project/entity_clone/issues/2945192 🐛 Fatal error: Maximum function nesting level of '256' reached, aborting! With Support for sub-entity cloning patch Fixed

I still get the error mentioned in the title. I am trying to clone a node with paragraphs, which in turn can reference nodes (which contain paragraphs that can reference nodes, and so on). These are my settings:

I previously used the patch at https://www.drupal.org/project/entity_clone/issues/2706639#comment-12515601 , which worked for me. What I don't understand is why I still get the error, even though all the "Hide checkboxes" are ticked off. See my comment here:
This does not actually solve the problem of the timeout in #2945192 due to recursive looping, but it does offer a workaround: if an admin decides how to clone entities (and thus checks all the "Hide checkboxes" on the config page), we don't need to build a render array and get no error.

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇧🇪Belgium sam.spinoy@gmail.com

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇭Switzerland sir_squall

    hi @nsciacca,

    Thanks a lot for the patch!

    I had the same issue but without paragraph, I have upgraded from D9 to D10, and then the clone was giving me this error:
    Fatal error: Allowed memory size of 671088640 bytes exhausted (tried to allocate 20480 bytes) in .../core/lib/Drupal/Core/Field/FieldItemBase.php on line 109

    I applied your patch, and now the clone is working well.

    I think we should apply this patch in the module, to avoid this error in the future.

    Thanks

Production build 0.71.5 2024