Problem/Motivation
Create a custom entity type and define the form display as non-configurable in the base field definitions and also have the language module installed.
You'll expect that the language component is hidden in the form display, but it is not because of language_entity_base_field_info_alter()
setting it to configurable without any other checks.
The only way to deactivate it would be to implement the same hook in the module where the entity type is being defined and revert what the hook from the language module has done, which isn't DX-friendly and also requires debugging or present knowledge of what the language module is doing.
Proposed resolution
Let language_entity_base_field_info_alter()
set the displays of the language field configurable only if there is no value yet provided.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | 2886718-2.patch | 977 bytes | hchonov |
Comments
Comment #2
hchonovSomething like this, but we need a better way of checking if the "configurable" value is set.
Comment #3
hchonovComment #15
smustgrave CreditAttribution: smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Moving back to NW for the tests as those would still need to happen.