Recursive Limit Breaks Normal, Repeated Use of a Media item on a page

Created on 12 July 2019, over 5 years ago
Updated 31 October 2023, about 1 year ago

The fix for this issue, https://www.drupal.org/project/entity_embed/issues/3063398 β†’ , caused the same issue seen here, https://www.drupal.org/project/drupal/issues/2940605 πŸ› Can only intentionally re-render an entity with references 20 times Needs work , but now affecting embedded entities.

My site had a page with an embedded Media entity of a simple checkmark for a comparison table reused as many times as needed (I think around 40). I upgraded to the newest version of entity_embed, and all of a sudden I noticed that only 20 of those images were getting rendered. I tracked it back to the recursive limit now in place: https://git.drupalcode.org/project/entity_embed/blob/8.x-1.0/src/Plugin/...

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

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.

  • πŸ‡ΊπŸ‡ΈUnited States joshf

    The patch in #5 solved the problem for me; thanks!

    It does need the test to be completely rewritten, as the current test only checks to see whether an item can be rendered more than 20 times with the same context and fails if it can (which is just completely wrong). The correct test won't be trivial to write because I think you'll need to provide some mock classes β†’ to set up the correct behavior. The patch also needs code quality fixes.

    #11 is a very limited workaround, not a fix, and should not be considered for merging.

    #15 is simply incomplete; the way it's written no behavior is changed. It might work if there was a call made to ::setRenderPath(), but there isn't. I'm hiding it because it's just not a solution and will only confuse things.

    @wylbur this issue is specifically for the entity_embed module; the Drupal core patch you referenced will not fix this issue. Further, I don't think patching this module will fix any problems you're having with paragraphs.

Production build 0.71.5 2024