Coral Pathfield not working properly | Community
Skip to main content
New Participant
February 17, 2023
Solved

Coral Pathfield not working properly

  • February 17, 2023
  • 1 reply
  • 829 views

Hi,

 

I'm working with AEM 6.5 on-premise with the 6.5.15.0 SP installed, and currently, the pathfield is not working correctly. The dialog to select a path won't open, and in the console, it says next:

Uncaught TypeError: currentColumnEl is undefined

 If a value is entered into the input area, for example "/", then the dialog opens appropriately and you can select a path as you wish.

This is the .xml file and how it's currently set up:

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.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="Properties" sling:resourceType="cq/gui/components/authoring/dialog"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <text jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/textfield" fieldLabel="Text" name="./text"/> <test jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/pathfield" fieldLabel="Test" fieldDescription="Test" name="./test" rootPath="/content/"/> </items> </column> </items> </content> </jcr:root>

 

Is this a bug, or am I missing something? Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @matzika,

The issue is caused by incorrect value in rootPath property, it should not end with /.

Use:

 

rootPath="/content"

 

instead:

 

rootPath="/content/"

 

Full config will look like this:

 

<test jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/pathfield" fieldLabel="Test" fieldDescription="Test" name="./test" rootPath="/content"/>

 

1 reply

lukasz-m
lukasz-mAccepted solution
New Participant
February 17, 2023

Hi @matzika,

The issue is caused by incorrect value in rootPath property, it should not end with /.

Use:

 

rootPath="/content"

 

instead:

 

rootPath="/content/"

 

Full config will look like this:

 

<test jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/pathfield" fieldLabel="Test" fieldDescription="Test" name="./test" rootPath="/content"/>