Problem/Motivation
As decided in #2745619: [policy, no patch] Which core entities get revisions?, taxonomy terms should be converted to be revisionable.
The main use case that the Workflow Initiative proposed for this change is site-wide previews of not yet published content (nodes, media items, taxonomy terms, menu links, etc.), through the Workspaces module.
The parent
and weight
fields are now revisionable as well, but they can not be changed in pending revisions. Support for updating term parents in a pending revision will be provided in #2861506: Add support for changing taxonomy term parents in pending revisions.
Proposed resolution
Convert taxonomy terms to be revisionable using the new API introduced in #2984782: Add an API for converting entity type schemas to (non-)revisionable/(non-)translatable, with or without data.
Remaining tasks
Review/commit/celebrate.
User interface changes
In the vocabulary overview page, the drag-and-drop interaction will be disabled if the vocabulary has at least one term with a pending revision:
API changes
API additions:
\Drupal\taxonomy\Entity\Term
now extends the\Drupal\Core\Entity\EditorialContentEntityBase
base entity class- The
taxonomy_term
entity type has a new entity-level constraint (TaxonomyTermHierarchy
) which prevents theparent
andweight
fields from being updated when creating a pending revision \Drupal\taxonomy\TermInterface
now implements\Drupal\Core\Entity\RevisionLogInterface
Data model changes
Taxonomy terms are now revisionable.
Release notes snippet
Taxonomy terms are now revisionable, which allows them to take part in moderation workflows like other first-class entity types in core, for example Content, Media items and Custom blocks.