admin管理员组文章数量:1122832
I am using system_config.yaml to set the default configuration. I need to set the value of core.app.shopId but when I try to do:
core.app.shopId.value: '%env(SHOP_ID)%'
looks like it is working but when I logged in to the admin and tried to save the configuration in settings > basic Information
I faced an error:
Expected domain
As I understand this correctly domain should be core.app.shopId
but in my yaml is core.app.shopId.value
and this is not passing the domain validation.
I also tried to add the array:
core app.shopId:
value: '%env(SHOP_ID)%'
But I faced the error:
Invalid type for path "shopware.system_config.default.core.app.shopId". Expected "scalar", but got "array".
Maybe someone knows how to achieve this?
I am using system_config.yaml to set the default configuration. I need to set the value of core.app.shopId but when I try to do:
core.app.shopId.value: '%env(SHOP_ID)%'
looks like it is working but when I logged in to the admin and tried to save the configuration in settings > basic Information
I faced an error:
Expected domain
As I understand this correctly domain should be core.app.shopId
but in my yaml is core.app.shopId.value
and this is not passing the domain validation.
I also tried to add the array:
core app.shopId:
value: '%env(SHOP_ID)%'
But I faced the error:
Invalid type for path "shopware.system_config.default.core.app.shopId". Expected "scalar", but got "array".
Maybe someone knows how to achieve this?
Share Improve this question asked Nov 22, 2024 at 8:55 Martin LockeMartin Locke 11 Answer
Reset to default 0You need to configure core.app.shopId directly as a simple scalar value in the system_config.yaml, referencing the environment variable properly. Here's how to do it:
yaml
shopware:
system_config:
default:
core.app.shopId: '%env(SHOP_ID)%'
Explanation: core.app.shopId is set directly to the value of the environment variable SHOP_ID. There's no need to use value or any nested structure—this avoids the domain validation issue.
本文标签: shopware6Shopware 6coreappshopId in systemconfigyaml to set the default configurationStack Overflow
版权声明:本文标题:shopware6 - Shopware 6 - core.app.shopId in system_config.yaml to set the default configuration - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736305021a1932442.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论