Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295549

Make BaseFieldOverride inherit internal property from the base field

$
0
0

Problem/Motivation

When a base field (e.g. entity path) properties are changed (e.g. it is made non-translatable), it's isInternal() method is inherited from FieldConfigBase, so that any computed field becomes internal though initially the field might be non-internal. This, for example, will remove the field from JSON:API results and might have other undesired consequences.

Steps to reproduce

  1. Create node and set up JSON:API for the node to be exposed via API.
  2. Make sure the path is exposed in the attributes section.
  3. Mark URL Alias as untranslatable and clear caches.
  4. See that the path has disappeared from the JSON:API response.

Proposed resolution

The correct approach is to inherit the internal property from the base field definition like other properties like "computed" and "read only" are.

Remaining tasks

Change record
Review code.

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295549


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>