Expose URL alias fields to views

Created on 22 May 2023, over 1 year ago
Updated 3 April 2024, 8 months ago

Problem/Motivation

URL alias data is not available in views.

Steps to reproduce

1. Create a new view at admin/structure/views/add
2. 'URL alias' or 'URL alias revisions' don't appear as options in View settings > Show dropdown.

Proposed resolution

Add a new class that extends Drupal\views\EntityViewsData and add as a handler to Drupal\path_alias\Entity\PathAlias. The handler will expose the id, revision_id, uuid, landcode, path, alias and status fields in the path_alias table.

Remaining tasks

Write a patch
Tests
Review
Commit

User interface changes

URL alias and URL alias revisions will appear as options in View settings > Show dropdown.

API changes

None.

Data model changes

None.

Release notes snippet

TBD

Feature request
Status

Needs work

Version

11.0 🔥

Component
Path 

Last updated 6 days ago

  • Maintained by
  • 🇬🇧United Kingdom @catch
Created by

🇦🇺Australia mcaddz

Live updates comments and jobs are added and updated live.
  • 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