Expand my Community achievements bar.

SOLVED

Exception using dialog field in touch UI field throwing exception

Avatar

Level 9

Environment: AEM 6.5 SP11 Java 8

Image fileupload field cq/gui/components/authoring/dialog/fileupload is throwing exception. This field is as it is copied from ootb component /libs/wcm/foundation/components/image/cq:dialog/content/items/image/items/column/items/file

when used in page properties

Screen Shot 2022-03-24 at 11.20.41 PM.png

throwing exception

Screen Shot 2022-03-24 at 11.21.55 PM.png

error seems to be coming from

 org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException

java.lang.NullPointerException: null

        at com.adobe.granite.ui.components.impl.BaseComponentHelper.include(BaseComponentHelper.java:518) [com.adobe.granite.ui.commons:5.10.15.CQ650-B0008]

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Able to replicate the issue.

Could you please try below  approach as defined https://stackoverflow.com/questions/45711908/aem-6-3-create-page-with-fileupload-within-cq-dialog

 

DEBAL_DAS_0-1648183107677.png

DEBAL_DAS_1-1648183140657.png

I believe we need to use /libs/granite/ui/components/coral/foundation/form/fileupload with fileupload field in page properties [https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/...

 

 

One thing I have done , I have copied thumbnail field structure under basic tab at page properties and now able to upload images as shown below -

DEBAL_DAS_0-1648213839385.pngDEBAL_DAS_1-1648213887700.png

DEBAL_DAS_2-1648213923224.png

DEBAL_DAS_3-1648213979115.png

 

 

Uploaded file is getting stored here. file.sftmp is used to hold tempaory assets data in JCR -

DEBAL_DAS_4-1648214049938.png

 

Hope this information will help.

View solution in original post

3 Replies

Avatar

Level 9

Looking at the OOTB code, I see line com.adobe.granite.ui.components.impl.BaseComponentHelper.include 518 as Screen Shot 2022-03-24 at 11.35.06 PM.png 

system depfinder has the following

Screen Shot 2022-03-24 at 11.37.48 PM.png

Looking for help, not sure what is causing the issue

Avatar

Level 9

further debugged this, found other fields also throwing exception. 

I do see exception like this

24.03.2022 23:46:09.499 *ERROR* [[0:0:0:0:0:0:0:1] [1648179969038] GET /mnt/overlay/wcm/core/content/sites/properties.html HTTP/1.1] libs.granite.ui.components.shell.propertiespage Unable to render properties page correctly
org.apache.sling.api.scripting.ScriptEvaluationException:
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:416) [org.apache.sling.scripting.core:2.3.2]
at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184) [org.apache.sling.scripting.core:2.3.2]

 

... 503 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.adobe.granite.ui.components.impl.BaseComponentHelper.include(BaseComponentHelper.java:518) [com.adobe.granite.ui.commons:5.10.15.CQ650-B0008]

Avatar

Correct answer by
Employee Advisor

Able to replicate the issue.

Could you please try below  approach as defined https://stackoverflow.com/questions/45711908/aem-6-3-create-page-with-fileupload-within-cq-dialog

 

DEBAL_DAS_0-1648183107677.png

DEBAL_DAS_1-1648183140657.png

I believe we need to use /libs/granite/ui/components/coral/foundation/form/fileupload with fileupload field in page properties [https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/...

 

 

One thing I have done , I have copied thumbnail field structure under basic tab at page properties and now able to upload images as shown below -

DEBAL_DAS_0-1648213839385.pngDEBAL_DAS_1-1648213887700.png

DEBAL_DAS_2-1648213923224.png

DEBAL_DAS_3-1648213979115.png

 

 

Uploaded file is getting stored here. file.sftmp is used to hold tempaory assets data in JCR -

DEBAL_DAS_4-1648214049938.png

 

Hope this information will help.