Problem/Motivation

The template triggers the duplicate rendering protection from \Drupal\Core\Entity\EntityViewBuilder::setRecursiveRenderProtection
I could not reproduce the issue outside of my project. However, the render array looks a strange (it has both # and non-# elements on the same level). The error disappeared once I adopted the pattern from other core entity types (like node, media or user).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

webflo created an issue. See original summary.

webflo’s picture

Issue summary: View changes

rodrigoaguilera’s picture

Status: Active » Fixed

I'm not sure either why the mix of render and non-render elements as I didn't have the recursive rendering trigger on my sites but definitely the pattern of other entities is not being followed so this is probably the root of the problem.

I tested locally the change and it didn't change any of my rendering so is good to merge.

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • webflo committed 9e3761d9 on 2.x
    Issue #3574096: Avoid duplicate processing in the template
    

Status: Fixed » Closed (fixed)

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