Highlighted

Required field validation for custom property in metadata schema not working for content fragment

Avatar

Avatar

nitinjl

Avatar

nitinjl

nitinjl

10-04-2019

Added a custom property in metadata schema and marked it as required (property rules). After applying custom schema on assets, mandatory field validation for custom property is working fine for all type of assets except content fragments.

Not sure is it a configuration miss or product bug. any thoughts please.

Thanks,

Replies

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829
Arun_Patidar
MVP

10-04-2019

Hi,

I checked in 6.4, I can see alert when mandatory field are not filled for both assets and cf.

1730573_pastedImage_0.png

After entering metadata , it gives no error.

1730574_pastedImage_1.png

So working as expected.

Highlighted

Avatar

Avatar

nitinjl

Avatar

nitinjl

nitinjl

11-04-2019

Thanks Arun,

Now if open and see properties of selected asset (as below), should be able to issue I am talking about.

Able to reproduce issue in 6.4 and 6.4.3 version.

Tried it in 6.3 and not seeing any issue.

In logs (6.4 and 6.4.3) getting below error

javax.jcr.PathNotFoundException: stock:id not found on /content/dam/testcf/test1234/jcr:content/metadata

at org.apache.jackrabbit.oak.jcr.session.NodeImpl$11.perform(NodeImpl.java:635) [org.apache.jackrabbit.oak-jcr:1.8.9]

at org.apache.jackrabbit.oak.jcr.session.NodeImpl$11.perform(NodeImpl.java:628) [org.apache.jackrabbit.oak-jcr:1.8.9]

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:208) [org.apache.jackrabbit.oak-jcr:1.8.9]

at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112) [org.apache.jackrabbit.oak-jcr:1.8.9]

at org.apache.jackrabbit.oak.jcr.session.NodeImpl.getProperty(NodeImpl.java:628) [org.apache.jackrabbit.oak-jcr:1.8.9]

at com.adobe.granite.asset.core.impl.metadata.xmpjcr.JcrXmpUtils.getProperty(JcrXmpUtils.java:154) [com.adobe.granite.asset.core:2.2.56]

at com.adobe.granite.asset.core.impl.metadata.AssetMetadataImpl.getProperty(AssetMetadataImpl.java:136) [com.adobe.granite.asset.core:2.2.56]

at com.day.cq.dam.core.impl.AssetImpl.getMetadataValue(AssetImpl.java:198) [com.day.cq.dam.cq-dam-core:5.11.330]

at com.day.cq.dam.core.impl.AssetImpl.getMetadataValue(AssetImpl.java:178) [com.day.cq.dam.cq-dam-core:5.11.330]

at com.day.cq.dam.commons.util.StockUtil.isStockAsset(StockUtil.java:53) [com.day.cq.dam.cq-dam-commons:5.11.182]

at org.apache.jsp.libs.dam.cfm.admin.components.v2.contentrenderer.cards.contentfragment.contentfragment_jsp._jspService(contentfragment_jsp.java:2633)

at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [org.apache.sling.scripting.jsp:2.2.7.B002]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [org.apache.felix.http.servlet-api:1.1.2]

JPG

1730993_pastedImage_0.png

Content Fragment

1730994_pastedImage_1.png

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829
Arun_Patidar
MVP

11-04-2019

Hi,

I am able to reproduce the issue, looks like a bug.

You can raise this with day care support as well.

Highlighted

Avatar

Avatar

nitinjl

Avatar

nitinjl

nitinjl

12-04-2019

Yep, already did that yesterday. Waiting for reply from Adobe.

Thanks.