Have Views' taxonomy term filters use UUIDs instead of entity IDs

Created on 6 July 2016, almost 8 years ago
Updated 14 November 2023, 7 months ago

Problem/Motivation

To support the model of deployable configuration, Views configuration with filters on taxonomy terms (or any entity reference field for that matter) should use the UUID of the entity chosen.

For example, creating a view which has a filter on a term from a node field should export to configuration with UUID filter values rather than taxonomy term entity IDs.

Current proposal

On the front-end, keep everything using entity IDs. On the back-end (storage), store IDs as UUIDs, and convert them when passing between the front-end.

Tasks

Original proposal

Add a checkbox to the filter configuration form to allow users to use the uuid of the term as the filter value rather than the tid.

As a stop-gap until this is implemented in core, I implemented it as a custom filter which extends the current taxonomy term id filter. This may help in determining which parts of the code need to be touched when implementing https://gist.github.com/acbramley/1127c4698a9ae86885e03716f47e3281

Feature request
Status

Needs work

Version

11.0 🔥

Component
Views 

Last updated 1 day ago

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

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.69.0 2024