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.
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
I am going to test the path field by adding it to the same project that can be installed from this article - that uses other granite/coral types.
Building Experience Manager Components using Granite/Coral Resource Types
Views
Replies
Total Likes
I tested the Pathfield on AEM 6.4 and works fine, Here it is...
To test this - install the package in the third section of the article above. The section is titled -- Add additional resource types to your component
This will give you this structure under /apps.
Add a new node under items named video with the following Props:
Open the Page here --
http://localhost:4502/editor.html/content/Lab2018/en.html
Update the /apps/Lab2018/components/content/firstcomponent/firstcomponent.html. Include these lines of code at end -- before closing </div>
<p>
<b>path finder:</b> ${properties.video}
</p>
Now open the dialog and you will see the pathfinder:
This value now prints out on the page --
Try this all on a fresh AEM 6.4 DEV instance and i am sure you will get the same results.
Views
Replies
Total Likes
Thanks for your reply. You have Pathbrowser and that works fine.I have used Pathfield which is giving me a problem - granite/ui/components/coral/foundation/form/pathfield.
Could you please check for sling:resourceType as pathfield (above path)
Thanks,
Anuradha
Views
Replies
Total Likes
I am still seeing it work well when i change the resource type to this:
granite/ui/components/coral/foundation/form/pathfield
The result...
Views
Replies
Total Likes
What browser are using - i tested on Chrome and Firefox.
Views
Replies
Total Likes
I have tested it in chrome.
Views
Replies
Total Likes
Try the steps that i listed above on a fresh install. use that package and add a new node with the resource type -- granite/ui/components/coral/foundation/form/pathfield.
I am not seeing any errors.
Views
Replies
Total Likes
This is some issue which is coming up in our QA server of Aem 6.4. It works fine in localhost.
I compared the pathfield's code thinking there might be some difference in localhost granite/ui/components/coral/foundation/form/pathfield and QA's pathfield but there is no difference. I am not sure what's causing the problem.
Views
Replies
Total Likes
There is an issue in your QA instance. OOTB - as this package in the article shows - when you add the new node - path field works.
Are you seeing any errors in the log?
Views
Replies
Total Likes
I will have to check the logs.I'll get back ,once I check the same.
Thanks,
Anuradha
Views
Replies
Total Likes
I have checked the logs and dont anything logged specifically for pathfield in it. However, we are having a re-installation of 6.4 to our server and hopefully it would solve it.
Views
Replies
Total Likes
anuradhar46910715 Do the below and let me know if it doesn't work
Views
Replies
Total Likes
Thanks for the solution will apply it if reinstallation doesnt work fine.
Views
Replies
Total Likes
I have never had to make these configurations on AEM 6.3 or 6.4 to get the granite/Coral resource types work. They should work by default.
Views
Replies
Total Likes
This usually happens when you upgraded from 5.x to 6.x and the config changes affects the underlying overridden methods.
Views
Replies
Total Likes
That explains why i have never seen that. I use fresh instances.
Views
Replies
Total Likes
Hi smacdonald2008 and Kunwar,
I've started seeing a similar problem today - AEM 6.3 with service pack 6.3.1.
I've extended the pathfield component with some small changes. All works ok on my local dev environment - brings up the picker and allows me to select items from the aem assets/dam. When I deploy same code to an aem instance (same version and service pack) running on a VM and try and author a page, clicking the pathfield 'tick' icon produces an error in the browser similar to the poster's original report:
http://dev-author.westeurope.cloudapp.azure.com:4502/mnt/overlay/myapp/components/widget/content/pat... 404 (Not Found)
XMLHttpRequest.send @ granite.js:234
send @ jquery.js:10254
ajax @ jquery.js:9738
resolveElement @ foundation.js:2143
Prototype._togglePicker @ foundation.js:2796
(anonymous) @ foundation.js:2267
Do you have any idea what might be causing this - given the earlier discussion? Logs don't tell me much beyond what I already know.
Views
Replies
Total Likes
"I've extended the pathfield component with some small changes" - what changes did you do?
Views
Replies
Total Likes
Hi smacdonald2008
generally, I've added some clientlibs and extended (by copying and amending the copied jsps etc) to add additional markup. In the main pathfield render.jsp I have amended the line that assigns the defaultPickerSrc variable, so it now looks like the following,
final String defaultPickerSrc = "/mnt/overlay/myapp/components/widget/content/pathfield/picker.html" +
"{value}" +
"?_charset_=utf-8&root=" + Text.escape(rootPath) + "&filter=" + Text.escape(filter) + "&selectionCount=" + Text.escape(selectionCount);
Re the location relating to the not found request, i.e. /apps/myapp/components/widget/content/pathfield/picker, I've added a straight copy of /libs/granite/ui/content/coral/foundation/form/pathfield and added under my copy of that node 'actions/primary/clientlibs' child nodes, where I specify that I want to load the clientlibs when the picker dialog is opened. That node is at /apps/myapp/components/widget/content/pathfield/picker/actions/primary/clientlibs (and has a "categories" property to reference the client library).
Views
Replies
Total Likes
So it works without this code and then when you add this logic - it does not work properly. Are you following an Adobe Doc or community article to see if this can be reproduced?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies