【发布时间】:2020-09-12 00:01:00
【问题描述】:
我想创建自定义横幅组件,扩展自 SimpleBannerComponent。但是我创建后,在Backoffice中创建失败,见下文。
1) 我将此项目添加到我的*-items.xml 文件中。
<itemtype code="PromotionBannerCMSComponent" autocreate="true" generate="true" extends="SimpleBannerComponent"
jaloclass="my.package.core.jalo.components.PromotionBannerCMSComponent">
<description>Promotion banner component</description>
<deployment table="PromotionBanners" typecode="15301"/>
<attributes>
<attribute qualifier="code" type="java.lang.String">
<persistence type="property"/>
<modifiers/>
<description>Banner name (not unique)</description>
</attribute>
<attribute qualifier="title" type="localized:java.lang.String">
<description>Title</description>
<modifiers read="true" write="true" search="true" initial="true"/>
<persistence type="property"/>
</attribute>
<attribute qualifier="position" type="SimpleBannerPositionEnum">
<description>Banner position</description>
<modifiers optional="true" initial="true"/>
<persistence type="property"/>
</attribute>
<attribute qualifier="altText" type="localized:java.lang.String">
<description>Banner alt text</description>
<modifiers optional="true" initial="true"/>
<persistence type="property"/>
</attribute>
<attribute qualifier="titleSecondary" type="localized:java.lang.String">
<description>Title secondary</description>
<persistence type="property" />
<modifiers />
</attribute>
<attribute qualifier="urlLoc" type="localized:java.lang.String">
<description>Banner url</description>
<persistence type="property" />
<modifiers />
</attribute>
</attributes>
</itemtype>
2) 我做了ant clean all,重新启动了服务器,我运行HAC -> Update 并检查了我的自定义扩展名并检查了Update running system。然后我又重新启动了服务器。
3) 我想在后台 WCMS->Components->Add 中创建组件,但它失败并出现错误 - 我已打开 flexible.search.exception.show.query.details 来查看它:
[ConfigurableFlowController] Object could not be saved
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectSavingException: Object could not be saved
和
Caused by: de.hybris.platform.servicelayer.exceptions.ModelSavingException: [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@716c1b71]: unexpected validator error: SQL search error - Unknown column 'item_t0.p_catalogversion' in 'where clause' query = 'SELECT item_t0.PK FROM cmscomponent item_t0 WHERE
.
.
现在我连基本的 SimpleBannerComponent 都无法创建,其他组件也无法创建。更新有问题吗? 我正在使用 Hybris 1811.18。
【问题讨论】:
-
你试过
ant updatesystem吗?
标签: java hybris backoffice