Closed (works as designed)
Project:
Entity UI Builder
Version:
8.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2019 at 21:36 UTC
Updated:
22 Jun 2020 at 13:41 UTC
Jump to comment: Most recent
Comments
Comment #2
joachim commentedDoes your entity type specify a form for that mode in its annotation?
Comment #3
keesee commentedno. the form mode and associated form are exported configs.
I was able to recreate this on a test content entity (node)
any thoughts?
FORM MODE
core.entity_form_mode.node.test.yml
langcode: en
status: true
dependencies:
module:
- node
id: node.test
label: test
targetEntityType: node
cache: true
FORM DISPLAY
core.entity_form_display.node.test.test.yml
langcode: en
status: true
dependencies:
config:
- core.entity_form_mode.node.test
- field.field.node.test.body
- node.type.test
module:
- field_layout
- layout_discovery
- path
- text
third_party_settings:
field_layout:
id: layout_onecol
settings: { }
id: node.test.test
targetEntityType: node
bundle: test
mode: test
content:
body:
type: text_textarea_with_summary
weight: 121
settings:
rows: 9
summary_rows: 3
placeholder: ''
third_party_settings: { }
region: content
created:
type: datetime_timestamp
weight: 10
region: content
settings: { }
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
promote:
type: boolean_checkbox
settings:
display_label: true
weight: 15
region: content
third_party_settings: { }
status:
type: boolean_checkbox
settings:
display_label: true
weight: 120
region: content
third_party_settings: { }
sticky:
type: boolean_checkbox
settings:
display_label: true
weight: 16
region: content
third_party_settings: { }
title:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 5
settings:
match_operator: CONTAINS
size: 60
placeholder: ''
region: content
third_party_settings: { }
hidden: { }
ENTITY TAB
entity_ui.entity_tab.node.test.yml
langcode: en
status: true
dependencies:
module:
- node
id: node.test
label: test
path: test
tab_title: test
page_title: test
target_entity_type: node
target_bundles:
test: test
content_plugin: entity_form
content_config:
form_mode: test
weight: 10
Comment #4
joachim commentedThat's a known core issue. If you define a custom form view mode, to use it on an entity you need a form class in the annotation.
Comment #5
attisancan this be resolved without custom code?
Comment #6
joachim commentedI'm not sure, sorry.
See #2530086: How can we access the new form modes? and #2511720: Allow form modes to use default operation if a form operation is not explicitly set.