找不到带有目录标识"xxxProductCatalog"的CatalogVersion和版本"Staged"的目录 [英] CatalogVersion with catalogId 'xxxProductCatalog' and version 'Staged' not found

查看:94
本文介绍了找不到带有目录标识"xxxProductCatalog"的CatalogVersion和版本"Staged"的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循该教程

https://wiki.hybris.com/pages /viewpage.action?pageId=294094418&showComments=true

首先,我将impex名称更改为mystore名称.

first i changed impex names to mystore name.

然后我去了hac控制台,只更新了我的扩展名mystoreinitialdata.

Then i went to hac console and updated only my extension, mystoreinitialdata.

但是它给出了这些错误:

But it gives those errors:

Creating project data for mystoreinitialdata ...
Begin importing common data for [mystoremystoreinitialdata]
Begin importing product catalog data for [xxx]
Begin importing content catalog data for [xx]
Begin synchronizing Product Catalog [xxx]




Error creating sample data for mystoreainitialdata. See console output.

错误[hybrisHTTP39] [初始化] de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: 具有CatalogId'xxxProductCatalog'和'Staged'版本的CatalogVersion 找不到!

ERROR [hybrisHTTP39] [Initialization] de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: CatalogVersion with catalogId 'xxxProductCatalog' and version 'Staged' not found!

我进行了搜索,但是我的代码中没有xxxProductCatalog.

i searched and there is no xxxProductCatalog in my code.

我该怎么办?

推荐答案

确保在InitialDataSystemSetup中创建的ImportData具有ProductCatalog和Content Catalog属性的有效名称.像这样:

Make sure the ImportData created in your InitialDataSystemSetup has valid names for ProductCatalog and Content Catalog attributes. Like this:

final List<ImportData> importData = new ArrayList<ImportData>();

final ImportData sampleImportData = new ImportData();
sampleImportData.setProductCatalogName("mystore");
sampleImportData.setContentCatalogNames(Arrays.asList("mystore"));
sampleImportData.setStoreNames(Arrays.asList("mystore"));
importData.add(sampleImportData);

getCoreDataImportService().execute(this, context, importData);
getEventService().publishEvent(new CoreDataImportedEvent(context, importData));

getSampleDataImportService().execute(this, context, importData);
getEventService().publishEvent(new SampleDataImportedEvent(context, importData));

还要确保在以下文件的impex文件中创建名称为"mystoreContentCatalog"和"mystoreProductCatalog"的目录:

Also make sure, that catalogs with the names "mystoreContentCatalog" and "mystoreProductCatalog" are created in the impex files in the following files:

/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/contentCatalogs/mystoreContentCatalog/catalog.impex

/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/contentCatalogs/mystoreContentCatalog/catalog.impex

$contentCatalog=mystoreContentCatalog
$languages=ja,en,de,zh

INSERT_UPDATE ContentCatalog;id[unique=true]
;$contentCatalog

INSERT_UPDATE CatalogVersion;catalog(id)[unique=true];version[unique=true];active;languages(isoCode)
;$contentCatalog;Staged;false;$languages
;$contentCatalog;Online;true;$languages

/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/productCatalogs/mystoreProductCatalog/catalog.impex

/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/productCatalogs/mystoreProductCatalog/catalog.impex

$productCatalog=mystoreProductCatalog
$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
$languages=ja,en,de,zh

INSERT_UPDATE Catalog;id[unique=true]
;$productCatalog

INSERT_UPDATE CatalogVersion;catalog(id)[unique=true];version[unique=true];active;languages(isoCode);readPrincipals(uid)
;$productCatalog;Staged;false;$languages;employeegroup
;$productCatalog;Online;true;$languages;employeegroup

这篇关于找不到带有目录标识"xxxProductCatalog"的CatalogVersion和版本"Staged"的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆