Problem/Motivation

If there are a lot of records to reference to, a fatal error occurs: Allowed memory size exhausted in web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php on line 484.

Steps to reproduce

  • Create around 100'000 records of a content type to reference
  • Create a content type with an entity reference field to the before mentioned content type
  • Install verf module
  • Create a view of the second content type
  • In the Filter criteria section click on "Add"
  • In "Add filter criteria" modal dialog select the entity reference field verf filter
  • Click on "Apply" in the modal dialog
  • The dialog remains open, close it by clicking on top right x
  • Reload the views page

Proposed resolution

The error is caused by too many referenceable entities. Therefore, add some sort of limit in Drupal\verf\Plugin\views\filter\EntityReference::getReferenceableEntities(), both if no target bundles are selected and if target bundles are selected on the filter configuration form.

Comments

boromino created an issue. See original summary.

vensires’s picture

Status: Active » Closed (duplicate)
Related issues: +#2998697: Performance problem

Closing this as duplicate of #2998697: Performance problem.