異なる「includes」ノードがモジュールの構成ファイル内のネストされたパスを参照している場合、Sitecore Command Line Interface (CLI)のシリアル化コマンドが失敗することがあります。
例えば、次のコマンドを実行する場合に、
dotnet sitecore ser pull
次のようなエラーがコンソールに表示される場合があります(コマンドを2回実行しないとエラーが発生しない場合があることに注意してください)。
Detected the item with ID a2b9c39c-9a19-4067-910a-90c84f93ae9d existed on disk in more than one place (C:\inetpub\wwwroot\sc10.2sc.dev.local\src\serialization\master\sitecore\content\test\TEST.yml + more). Use the validate command to diagnose the problem.
この問題は、バージョン3.0.0以降のCLIで発生します。
解決策として、「includes」ノードでのネストされた名前の使用を避けることを検討してください。
変更前の例:
{
"namespace": "test",
"items": {
"includes": [
{
"name": "A/B/C",
...
},
{
"name": "A/B/C/D", // <---- 正しく動作しません
...
}
]
}
}
変更後の例:
{
"namespace": "test",
"items": {
"includes": [
{
"name": "A/B/C",
...
},
{
"name": "X/Y/Z/D", // <---- 正しく動作します
...
}
]
}
}