Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Path field throwing error in AEM 6.4 Touch UI

Avatar

Level 2

I am using granite/ui/components/coral/foundation/form/pathfield and when I click on the icon, it doesn't open the window but throws an error in the console.

/mnt/overlay/granite/ui/content/coral/foundation/form/pathfield/picker.html…t%2fdam%2fca&filter=hierarchyNotFile&selectionCount=single&_=1524569289626 Failed to load resource: the server responded with a status of 404 (Not Found)

I see that the image is present in the dam but still the path field fails to load it.

1472592_pastedImage_3.png

If I delete the selected image from the field and then click on path field icon, then it opens up.

Is there some other settings or properties I need to add for the pathfield?

Can you provide a solution for same?

Thanks,

Anuradha

1 Reply

Avatar

Level 4

Hi smacdonald2008

no, unfortunately, I am amending customisation provided from a third party - and who had a contractor working for them to add some further indirection! 

The previous supplier's code has a 'targetCollection' property value of '#cq-commerce-product-picker-collection' in their /apps/foo_app/components/widget/content/externalbrowser/picker node, which I see is similar to properties under /libs/commerce/gui/content/common/productfield.  Perhaps that's where they took their inspiration from?

Avatar

Level 4

smacdonald2008​ and Kunwar

thanks for your help with this.

Embarassingly it looks like the problem is down to the  spurious ""{value}" +" added into the middle of my defaultPickerSrc string.

I'm not sure how that works in my local but doesn't work elsewhere

Avatar

Level 10

If it works on your local and not on the other environment - there is either a lib that is required that is missing on the other environment OR something on the other environment that is causing an issue.

Try to deploy on a fresh AEM instance and see if that works - this will tell us if all dependencies are required to run this are on a new AEM instance.

Avatar

Level 4

Thanks Kunwar

unfortunately my mistake was even more basic - the data source for my picker - e.g. /content/myapp/dam wasn't there on the target VM environment

So spurious "{value}" actually a red herring.

I think I went down a bad line of enquiry.  Printing and sending you the stack trace was helpful though - because it pointed out to me that there's no issue with the "/mnt/overlay..." request path - just the parameters appended to it.  Easy really, some additional error info returned in the response body might save over people similar confusion in future(?)

Avatar

Employee

There should still be a config 'Apache Sling Java Script Handler' for AEM 6.3 as well. Can you check what are the value for Source and Target VM ? Change it to Auto if it is something else.

Also, Can you post the complete error.log and I can review it for you.

Avatar

Level 4

Thanks Kunwar

sorry you are right there are the config options available for us at http://dev-author.westeurope.cloudapp.azure.com:4502/system/console/configMgr/org.apache.sling.scrip... (I think i mistakenly did a text search for Javascript expecting it to be in the title) but they are the same as my local environment.

Here are some log snippets where the offending request and path appear:

Log file /opt/aem-author/crx-quickstart/logs/error.log -------------------------------------------------- 

15.05.2018 13:11:54.567 *INFO* [81.128.191.42 [1526389914529] GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html%7Bvalue%7D HTTP/1.1] com.adobe.acs.commons.errorpagehandler.cache.impl.ErrorPageCacheImpl Starting ACS AEM Commons Error Page Handler Cache

15.05.2018 13:11:54.567 *INFO* [81.128.191.42 [1526389914529] GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html%7Bvalue%7D HTTP/1.1] com.adobe.acs.commons.errorpagehandler.cache.impl.ErrorPageCacheImpl  > TTL (in seconds): 300

15.05.2018 13:11:54.567 *INFO* [81.128.191.42 [1526389914529] GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html%7Bvalue%7D HTTP/1.1] com.adobe.acs.commons.errorpagehandler.cache.impl.ErrorPageCacheImpl  > Serve authenticated requests from cache: true

15.05.2018 13:11:54.569 *INFO* [81.128.191.42 [1526389914529] GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html%7Bvalue%7D HTTP/1.1] com.adobe.acs.acs-aem-commons-bundle Service [8371, [javax.management.DynamicMBean]] ServiceEvent REGISTERED

...

15.05.2018 14:31:38.479 *INFO* [81.128.191.42 [1526394698477] GET /etc/designs/myapp/app.js.map HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /etc/designs/myapp/app.js.map not found

15.05.2018 14:31:38.794 *INFO* [81.128.191.42 [1526394698620] GET /libs/wcm/core/content/components.1526391008401.json HTTP/1.1] com.day.cq.wcm.core.impl.components.ComponentServlet provided components.

15.05.2018 14:31:39.190 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.190 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.191 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.191 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.192 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.192 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.192 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.193 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.193 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.193 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.194 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.194 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.194 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.195 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.201 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.201 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.202 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.202 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.202 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.203 *WARN* [81.128.191.42 [1526394699172] GET /bin/wcm/contentfinder/asset/view.html HTTP/1.1] com.adobe.granite.xss.impl.XSSFilterImpl Cannot use custom policies.

15.05.2018 14:31:39.784 *WARN* [81.128.191.42 [1526394699781] GET /editor.html/content/myapp/undefined.2.json HTTP/1.1] com.adobe.cq.xf.impl.servlet.rendercondition.EditorRenderCondition Page at path /content/myapp/undefined.2.json doesn't have a jcr:content node

15.05.2018 14:32:05.281 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse Sending GET request to http://13.94.155.0:4503/bin/receive?sling:authRequestLogin=1

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse sent. Response: 200 OK

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse ------------------------------------------------

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse Sending message to 13.94.155.0:4503

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse >> GET /bin/receive?sling:authRequestLogin=1 HTTP/1.0

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse >> Action: Internal Poll

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse >> Path:

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse >> Handle:

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse --

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse << HTTP/1.1 200 OK

15.05.2018 14:32:05.288 *INFO* [sling-default-121-com.day.cq.replication.impl.ReverseReplicator.6143] com.day.cq.replication.Agent.publish_reverse << Date: Tue, 15 May 2018 14:32:05 GMT

...

Around the time the problem is seen the error.log only seems to show INFO and WARN entries similar to the above.
But interestingly the request.log does return status 200 for some of the request parts (???)

Log file /opt/aem-author/crx-quickstart/logs/request.log --------------------------------------------------

15/May/2018:11:15:43 +0000 [2797] -> GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html%7Bvalue%7D?_charset_=utf-8&root=%2f&filter=image&selectionCount=single&_=1526382925353 HTTP/1.1

15/May/2018:11:15:43 +0000 [2797] <- 404 text/html 11ms

15/May/2018:11:16:13 +0000 [2798] -> GET /mnt/overlay/granite/ui/content/shell/header/actions/pulse.data.json?_=1526382914475 HTTP/1.1

15/May/2018:11:16:13 +0000 [2798] <- 200 application/json 13ms

15/May/2018:11:21:33 +0000 [2799] -> GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html HTTP/1.1

15/May/2018:11:21:33 +0000 [2799] <- 200 text/html 221ms

15/May/2018:11:21:33 +0000 [2801] -> GET /etc.clientlibs/myapp/components/widget/pathfield/clientlibs.js HTTP/1.1

15/May/2018:11:21:33 +0000 [2800] -> GET /etc.clientlibs/myapp/components/widget/pathfield/clientlibs.css HTTP/1.1

15/May/2018:11:21:33 +0000 [2800] <- 200 text/css 43ms

15/May/2018:11:21:33 +0000 [2801] <- 200 application/javascript 63ms

15/May/2018:11:21:33 +0000 [2802] -> GET /libs/granite/csrf/token.json HTTP/1.1

15/May/2018:11:21:33 +0000 [2802] <- 200 application/json 1ms

15/May/2018:11:22:38 +0000 [2803] -> GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html%7Bvalue%7D?_charset_=utf-8&root=%2f&filter=image&selectionCount=single&_=1526382925353 HTTP/1.1

15/May/2018:11:22:38 +0000 [2803] <- 404 text/html 52ms

15/May/2018:11:24:01 +0000 [2804] -> GET /libs/cq/i18n/dict.en.json HTTP/1.1

15/May/2018:11:24:01 +0000 [2804] <- 304 - 1ms

15/May/2018:11:24:01 +0000 [2805] -> GET /libs/granite/csrf/token.json HTTP/1.1

15/May/2018:11:24:01 +0000 [2805] <- 200 application/json 2ms

15/May/2018:11:25:11 +0000 [2806] -> GET /mnt/overlay/myapp/components/widget/content/pathfield/picker.html%7Bvalue%7D?_charset_=utf-8&root=%2f&filter=image&selectionCount=single&_=1526382925354 HTTP/1.1

15/May/2018:11:25:11 +0000 [2807] -> GET /editor.html/content/myapp/homepage.html HTTP/1.1

15/May/2018:11:25:11 +0000 [2806] <- 404 text/html 15ms

Avatar

Employee

15.05.2018 14:31:39.784 WARN [81.128.191.42 GET /editor.html/content/myapp/undefined.2.json HTTP/1.1] com.adobe.cq.xf.impl.servlet.rendercondition.EditorRenderCondition Page at path /content/myapp/undefined.2.json doesn't have a jcr:content node

Why is it triggering an undefined for your myapp and pages under it ?

Avatar

Level 4

Hi Kunwar

sorry it wasn't very helpful to include that WARN message.  It's something that was there before i joined the project, doesn't seem to affect operation of our custom code and to be honest i've ignored it (i think it's related to some vue.js custom javascript we include but I don't work on that part of the dev effort at the moment haven't looked into what causes it!)

Avatar

Level 3

Whats the fix for this issue? smacdonald2008Kunwardorianhallward anuradhar46910715 I've upgraded from 6.3.2 to 6.4.4 and I see below error for Pathfield - this is only happening on QA environments and not on a fresh local instance.

19.06.2019 *ERROR* [10.43.32.88 [1560969487301] GET /mnt/overlay/granite/ui/content/coral/foundation/form/pathfield/picker.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException

org.apache.sling.scripting.java.impl.ServletWrapper$CompilerException: Compilation errors in /libs/granite/ui/components/coral/foundation/form/pathfield/datasources/children/children.java:

Line 105, column 4458 : '<>' operator is not allowed for source level below 1.7

Line 113, column 4811 : The method evaluate(Resource) of type new Predicate<Resource>(){} must override a superclass method

Line 125, column 5379 : '<>' operator is not allowed for source level below 1.7

Line 129, column 5574 : The method compare(Resource, Resource) of type new Comparator<Resource>(){} must override a superclass method

Line 134, column 5765 : '<>' operator is not allowed for source level below 1.7

Line 134, column 5789 : '<>' operator is not allowed for source level below 1.7

Line 160, column 6671 : The method transform(Resource) of type new Transformer<Resource,Resource>(){} must override a superclass method

Line 185, column 7521 : The method evaluate(Resource) of type children.FolderPredicate must override a superclass method

Line 202, column 7991 : The method evaluate(Resource) of type children.HierarchyPredicate must override a superclass method

Line 219, column 8467 : The method evaluate(Resource) of type children.NoSystemPredicate must override a superclass method

Line 236, column 8990 : The method evaluate(Resource) of type children.HierarchyNotFilePredicate must override a superclass method

Line 273, column 10149 : '<>' operator is not allowed for source level below 1.7

Line 273, column 10173 : '<>' operator is not allowed for source level below 1.7

Line 275, column 10322 : The method transform(Resource) of type new Transformer<Resource,Resource>(){} must override a superclass method