Fields with no schema defined have no columns.

Created on 20 March 2024, over 1 year ago
Updated 15 June 2024, about 1 year ago

Problem/Motivation

I was thinking of creating a custom plugin for Url Alias fields that checks for known language codes used in the first part of the path for multilingual sites to prevent someone from entering something like /es/some-page which would end up with a resolved url of /es/es/some-page. The problem is there is no column for this field type and the column field is required.

Steps to reproduce

Add a node > article type validation rule against Url Alias field. Notice there is no column available to select for this field type.

Proposed resolution

The findColumn function relies on field schema. I noticed the PathItem field type provides empty schema so any field type that doesn't provide schema will return empty columns. Instead of $field_info->getSchema, can we instead do $field_info->getPropertyDefinitions() and then build an options list for every property that isn't computed?

πŸ› Bug report
Status

Needs review

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States apmsooner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024