Remove node code from taxonomy. Make it pluggable

Created on 18 October 2017, about 7 years ago
Updated 9 February 2023, almost 2 years ago

Problem/Motivation

The taxonomy module hard-codes some node functionality that is hard-coupled in the module. Taxonomy uses default field storage to store canonical relationships between terms and fieldable entities. However in relation with the Node entity it uses a dedicated denormalized table {taxonomy_index} to avoid slow queries due to joining across multiple node and field tables with various conditions and order by criteria. It's possible for a 3rd party module to implement its own custom storage engine that uses alternative methods of denormalizing this data, but right now this is not managed by an API.

Proposed resolution

  • Remove the node code from taxonomy.
  • Provide a common API to make this process pluggable.

Remaining tasks

  • Reroll per #16
  • Add tests
  • Move the taxonomy.settings:maintain_index_table in the Node module while still keeping BC. Add upgrade path and upgrade path tests.

User interface changes

None.

API changes

  • New plugin type: \Drupal\taxonomy\TermReferenceInterface
  • Add a plugin implementation for Node
  • Plugin manager

Data model changes

None.

Feature request
Status

Needs work

Version

10.1

Component
Taxonomy 

Last updated about 4 hours ago

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

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Live updates comments and jobs are added and updated live.
  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

  • API addition

    Enhances an existing API or introduces a new subsystem. Depending on the size and impact, possibly backportable to earlier major versions.

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