1

我已经使用主菜单功能区上的导出按钮导出了站点主题。我添加了新的 sass 组件并运行 gulp watch-component 脚本,它将 .../sass/styles/component-xxx.scss 文件转换为 .../styles/component-xxx.css 文件。我已将新文件引用添加到 index.html 文件中,主题已成功应用于我的本地页面。

我已压缩本地更改并尝试将其导入 Sitecore。它引发了以下错误。

An item name cannot contain any of the following characters: \/:?"<>|[]. (controlled by the setting InvalidItemNameChars)
   at Sitecore.Data.Items.ItemUtil.AssertItemName(Item destinationItem, String name)
   at Sitecore.Data.Items.Item.Add(String name, TemplateID templateID)
   at Sitecore.Data.DefaultDatabase.CreateItemPath(String path, TemplateItem folderTemplate, TemplateItem itemTemplate)
   at Sitecore.XA.Feature.CreativeExchange.Pipelines.Import.AssetProcessing.ContainerValidation.Process(AssetProcessingArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.XA.Feature.CreativeExchange.Pipelines.Import.Import.AssetEnumeration.ProcessAsset(IImportEntry entry, ImportArgs importArgs)
   at Sitecore.ContentSearch.Utilities.EnumerableExtensions.ForEach[T](IEnumerable`1 collection, Action`1 action)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.XA.Feature.CreativeExchange.Jobs.Import.ImportBackgroundJob.Run(GetImportContextArgs args)

为了解决这个错误,我在 Sitecore 中的主题各自文件夹下手动创建了 component-xxx scss 和 css 文件。我再次导出主题 zip 文件并应用我的更改并将该文件导入 Sitecore。这次导入成功。

我们无法通过创意交换添加新文件是 sxa 的预期行为吗?

4

0 回答 0