Problem/Motivation

TaxonomyHierarchySelection does this:

      $bundles = $this->entityTypeBundleInfo->getBundleInfo('taxonomy_term');
      $bundle_names = array_keys($bundles);

      // If we have specific handler settings, use them.
      if (isset($this->configuration['handler_settings'])) {
        $handler_settings = $this->configuration['handler_settings'];
        $bundle_names = $handler_settings['target_bundles'];
      }

handler_settings never exists in this context

Steps to reproduce

Create some vocabularies with thousands of taxonomy terms
Create a small editorial section vocab
Notice all terms in every vocab are loaded when using entity_autocomplete widget for the WBA field
Get an OOM if you have a low memory ceiling

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

tannguyenhn created an issue. See original summary.

tannguyenhn’s picture

tannguyenhn’s picture

Issue summary: View changes

acbramley made their first commit to this issue’s fork.

acbramley’s picture

Title: Use selection config target_bundles directly in taxonomy hierarchy selector » TaxonomyHierarchySelection checks for target_bundles in incorrect location
Priority: Normal » Critical
Issue summary: View changes

acbramley’s picture

Issue summary: View changes
Status: Active » Needs review

Marking this critical as it can produce consistent OOM errors.

acbramley’s picture

Tests are fixed in #3623161: Fix phpunit

larowlan made their first commit to this issue’s fork.

  • larowlan committed b77a6a46 on 2.0.x authored by acbramley
    fix: #3577150 TaxonomyHierarchySelection checks for target_bundles in...
larowlan’s picture

Status: Needs review » Fixed

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.