You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Shopware 6:system_config.yaml配置core.app.shopId默认值报错求助

解决Shopware system_config.yaml中core.app.shopId配置报错问题

直接给core.app.shopId赋值环境变量即可,不需要额外嵌套value键或使用数组结构,因为该配置项要求是标量类型(单一字符串/数值),而非数组。

正确的YAML配置代码:

shopware:
  system_config:
    default:
      core.app.shopId: '%env(SHOP_ID)%'

错误原因说明

  • 第一种写法core.app.shopId.value: '%env(SHOP_ID)%'会被系统识别为完整配置域core.app.shopId.value,但系统仅认可core.app.shopId作为合法域,导致后台保存时出现Expected domain错误。
  • 第二种数组形式将core.app.shopId定义为包含value键的数组,不符合系统对该配置项标量类型的要求,因此触发Invalid type... Expected "scalar", but got "array"错误。

内容的提问来源于stack exchange,提问作者Martin Locke

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 01:22:34