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
- Create node and set up JSON:API for the node to be exposed via API.
- Make sure the path is exposed in the attributes section.
- Mark URL Alias as untranslatable and clear caches.
- 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.