Hi All,
We are upgrading the Coral 2 component field to Coral 3. For the custom component with two select field datasource node when we update the sling:resourceType path to coral, the select dialog field disappears from the component and it also doesn't allow us to edit/configure the component. When we checked the logs we saw the below error:
*ERROR* [1.1.1.1 [4648447484] GET /mnt/override/apps//jcr:content/root/responsivegrid/test_component HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
java.lang.IllegalStateException: Resource resolver is already closed.
at ....
.
.
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) [org.apache.felix.http.jetty:4.1.10]
at java.base/java.lang.Thread.run(Thread.java:829)
We don't observe any logs related to custom servlet/code. Kindly help us to get this issue fixed.
Views
Replies
Total Likes
Hello @AK86
Please refer to this Blog on Dynamic Dropdowns using datasource https://unlocklearning.in/dynamic-dropdown-in-aem/
Please check if anything is missing in config or the Servlet returning the datasource results
I went through this blog before adding a post here however that also didn't help. Here is how the component xml looks:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:coral="http://www.adobe.com/coral/ns/coral/1.0"
xmlns:granite="http://www.adobe.com/jcr/granite/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:cc="http://www.adobe.com/cq/content/4.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Article Feature"
sling:resourceType="cq/gui/components/authoring/dialog"
extraClientlibs="[core.wcm.components.navigation.v1.editor]"
helpPath="https://www.adobe.com/go/aem6_2_docs_component_en#Text - Sightly">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/layouts/fixedcolumns"
margin="{Boolean}false"
type="nav"/>
<items jcr:primaryType="nt:unstructured">
<section
jcr:primaryType="nt:unstructured"
jcr:title="Feature Component Properties"
sling:resourceType="granite/ui/components/coral/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/layouts/fixedcolumns"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<articleType
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
granite:class="cq-dialog-dropdown-showhide"
fieldLabel="Article Type"
name="./articleType"
required="true">
<granite:data
jcr:primaryType="nt:unstructured"
cq-dialog-dropdown-showhide-target=".feature-hide-show"/>
<items jcr:primaryType="nt:unstructured">
<fixed-list
jcr:primaryType="nt:unstructured"
text="Fixed List"
value="fixed-list"/>
<manual-list
jcr:primaryType="nt:unstructured"
text="Manual List"
value="manual-list"/>
</items>
</articleType>
<articleImage
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
allowUpload="{Boolean}false"
autoStart="{Boolean}false"
class="cq-droptarget hide feature-hide-show"
fieldLabel="Image"
fileNameParameter="./fileName"
fileReferenceParameter="./articleImage"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./imageName"
showhidetargetvalue="manual-list"
title="Upload Image Asset"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>
<articleImageAltText
jcr:primaryType="nt:unstructured"
sling:resourceType="/libs/granite/ui/components/coral/foundation/form/textfield"
granite:class="article-feature-hide-show"
fieldLabel="Image Alt Text"
name="./articleImageAltText">
<granite:data
jcr:primaryType="nt:unstructured"
showhidetargetvalue="manual-list"/>
</articleImageAltText>
<articleEyebrow
jcr:primaryType="nt:unstructured"
sling:resourceType="/libs/granite/ui/components/coral/foundation/form/textfield"
granite:class="article-feature-hide-show"
fieldLabel="Eyebrow"
name="./articleEyebrow"
required="false">
<granite:data
jcr:primaryType="nt:unstructured"
showhidetargetvalue="manual-list"/>
</articleEyebrow>
<articleTitle
jcr:primaryType="nt:unstructured"
sling:resourceType="/libs/granite/ui/components/coral/foundation/form/textfield"
granite:class="article-feature-hide-show"
fieldLabel="Title"
name="./articleTitle"
required="true">
<granite:data
jcr:primaryType="nt:unstructured"
showhidetargetvalue="manual-list"/>
</articleTitle>
<articleByline
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
granite:class="article-feature-hide-show"
fieldLabel="Byline"
name="./articleByline"
required="false">
<granite:data
jcr:primaryType="nt:unstructured"
showhidetargetvalue="manual-list"/>
</articleByline>
<articleLinkPath
jcr:primaryType="nt:unstructured"
sling:resourceType="abc/components/widgets/contextualpathbrowser"
fieldLabel="Link Path"
name="./articleLinkPath"
required="true"/>
<articleLinkOpenNewWindow
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
name="./articleLinkOpenNewWindow"
text="Open Link in New Window"
value="true"/>
<articleDesc
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
granite:class="article-feature-hide-show"
fieldLabel="Description"
name="./articleDesc"
required="true">
<granite:data
jcr:primaryType="nt:unstructured"
showhidetargetvalue="manual-list"/>
</articleDesc>
<desktopTrans
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Desktop Image Transformation test *"
name="./desktopTrans"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/abc/content/imageTransform"
addNone="{Boolean}true"
selector="desktop"/>
</desktopTrans>
<mobileTrans
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Mobile Image Transformation *"
name="./mobileTrans"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/abc/content/imageTransform"
addNone="{Boolean}true"
selector="mobile"/>
</mobileTrans>
</items>
</column>
</items>
</section>
</items>
</content>
</jcr:root>
Views
Like
Replies
Views
Likes
Replies