Do not use \Drupal\taxonomy\TermStorageInterface::loadTree() in \Drupal\taxonomy\Form\OverviewTerms::buildForm()

Created on 6 April 2010, over 14 years ago
Updated 20 December 2023, 12 months ago

Problem/Motivation

When a vocabulary's term list exceeds an indeterminate amount, users may experience a WSOD . This is caused by a call to taxonomy_get_tree() from within taxonomy_overview_terms(). This produces a known memory limit issue.

Steps to reproduce the problem:

  1. Install Drupal 8.x with the standard profile.
  2. Install devel.
  3. Visit: Extend (/admin/modules).
  4. Enable Devel and Devel generate modules.
  5. Use Devel to auto-generate terms (/admin/config/development/generate/taxonomy).
  6. Generate for the "tags" vocabulary
  7. Number of terms: 10000.
  8. Browse to terms list for the tags vocabulary (/admin/structure/taxonomy/tags).
  9. Lower PHP memory limits and/or auto-generate more terms, until WSOD occurs in previous step.

Proposed resolution

Remaining tasks

  • screenshot of the current ui (a before screenshot)
  • decide what approach to implement

User interface changes

The proposed siblings browser may introduce new or changed features/functionality in the user interface at admin/structure/taxonomy/tags.
Comment #23 has most recent screenshot of taxonomy terms by vocabulary (before proposed siblings browser).

API changes

API changes/additions might be introduced in core's taxonomy module:

Original report by andypost

Vocabulary has hierarchy field with values from 0 to 2.
So overview page for vocabulary should take into accout hierarchy field.

This is a follow up from:
#762604: Taxonomy terms list broken, term add/edit forgets it's parent
#277200: Add tests for vocabulary hierarchy

catch:
I really dislike that we use taxonomy_get_tree() in taxonomy_overview_terms()

📌 Task
Status

Postponed

Version

11.0 🔥

Component
Taxonomy 

Last updated about 2 hours ago

  • Maintained by
  • 🇺🇸United States @xjm
  • 🇬🇧United Kingdom @catch
Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024