Problem/Motivation
I've just run into a ton of "Repeated rendering detected when rendering entity file: 263, using the field_image field. Aborting rendering.
" errors in my log when search api was indexing nodes.
The thing is that file 263 is rendered multiple times but on different entities.
Proposed resolution
The setting file_entity_protect_repeated_render
already mentions:
but it can also be triggered when the same image is rendered more than 20 times, e.g. in an long content list or data feed.
I'd say that we should take the entity id, of the entity the file field is attached to, into account when checking for repeated renders.
If the same file is rendered multiple times but on different entities this shouldn't count as "repeated" render as the context of the rendering is different.
This would exactly mitigate the above mentioned data feed scenario.
We also could make this configurable if there are site effects to be expected.
Remaining tasks
Reviews needed.
Figure out if there's a case where recursion hit's with different entity ids.
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
file_entity-repeated_render_id-should-use-parent-id-too.patch | 845 bytes | das-peter | |
Comments
Comment #2
gustavowal CreditAttribution: gustavowal at Zoocha commented+1 for the patch, at the moment of writing it seemed to resolved the issue of an image being rendered multiple times on different entities.
Comment #3
joseph.olstadOk I think this should go into a release very soon.
Comment #6
joseph.olstad