- Issue created by @jez300
Unable to use the entity browser with fields that have 1000+ referenced entities
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 9341848 bytes) in /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php on line 446
Create content with an entity reference to other content.
- Set form options for that field to "entity browser" + select Entity display plugin "Rendered entity", that runs out of memory much faster than just using "Entity label"
- Edit the content and link that field to 4000 other entities (you might get the error with much less, like 1000). you might need to do this programmatically
- Try and edit that content without getting a memory error. Even if it does not error, 1000+ entities is to much to view on one page!
Solution 1:
- Offer paging for the main view (it's available for selected entities, because you can link to a view)
Solution 2:
- Restrict main view to a maximum number of items
Active
2.9
Display plugins