【发布时间】:2021-11-15 15:34:30
【问题描述】:
我尝试通过模块将图像字段添加到自定义内容类型(商店)。和图片存储yml(field.storage.node.field_exp_image.yml)如下
langcode: en
status: true
dependencies:
module:
- file
- image
- node
id: node.field_exp_image
field_name: field_exp_image
entity_type: node
type: image
settings:
uri_scheme: public
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
target_type: file
display_field: false
display_default: false
module: image
locked: false
cardinality: 1
translatable: true
indexes:
target_id:
- target_id
persist_with_no_fields: false
custom_storage: false
并更新 core.entity_form_display.node.shop.default 以将图像字段添加到商店内容类型
langcode: en
status: true
dependencies:
config:
- field.field.node.shop.body
- field.field.node.shop.field_exp_image
- node.type.shop
module:
- text
- user
id: node.shop.default
targetEntityType: node
bundle: shop
mode: default
content:
body:
label: hidden
type: text_textarea_with_summary
weight: 101
settings: { }
third_party_settings: { }
field_exp_image:
type: image
settings:{}
third_party_settings: { }
weight: 6
links:
weight: 100
hidden: { }
我收到以下错误
由于未满足依赖关系,无法安装 shopwiz: core.entity_form_display.node.shop.default (field.field.node.shop.field_exp_image)
【问题讨论】:
标签: image drupal-8 content-type