Expand my Community achievements bar.

SOLVED

SVG icon not visible in AEMaaCS publish environment.

Avatar

Level 4

svg icon not visible in AEMaaCS publish environment but in author it works fine.

 

is there any specific configuration need to be allowed?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

This is an apps path which is blocked in publishers(by dispatcher as well as publish permission)

You have to create a proxy cleintlibs here to fix this. 

 

/apps/settings/wcm/tatar/test/clientlib-site/css/resources/icons/default.svg

 



Arun Patidar

View solution in original post

19 Replies

Avatar

Community Advisor

Hello @vkarthick,

 

Looks like a permission issue. Make sure you have read permission (on the asset) for anonymous user on publish instance.

 

Thanks   

Avatar

Community Advisor

Hi @vkarthick 

 

Are you getting broken images or its not at all loading . If its not due to permission you can look for the below post also could be due to some minifications or js/css issues.

 

https://github.com/adobe/aem-core-cif-components/issues/63

 

 

Avatar

Level 4

Hi @sherinregi , Its not at all loading and i could see other images which are authored loading, only svg icons are not loading.

I had also check before minified version there also same issue 

Avatar

Community Advisor

Hello @vkarthick,

 

I assume the svg icons are loading from code (not authored), in such case check the following

- make sure the folder name the icon is loading from is resources and the folder has a .content.xml in it

- with jcr:primaryType="cq:ClientLibraryFolder"

- with allowProxy="{Boolean}true"

- etc Node has read permission for anonymous user (on publish server)

 

Let me know if that helps..

 

 

 

 

Avatar

Level 4

@A_H_M_Imrul , Yes, its been loading from code. Currently debugging the issue.

 

I think need to move css folder under resources. let me try and test and update here

SVG_BUNDLE_PATH = "/apps/settings/wcm/tatar/test/clientlib-site/css/resources/icons/default.svg";

 

Avatar

Community Advisor

you need to load from outside css folder otherwise it will not work with proxy clientlibs

SVG_BUNDLE_PATH = "/apps/settings/wcm/tatar/test/clientlib-site/resources/icons/default.svg";

 



Arun Patidar

Avatar

Level 4

@A_H_M_Imrul @arunpatidar , As debugged this issue, it seems permissions issue in publish environment for anonymous user.

 

Do u have any idea for aem cloud that how we add this below "_rep_policy.xml" underneath of the folder

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
jcr:primaryType="rep:ACL">
<allow
jcr:primaryType="rep:GrantACE"
rep:principalName="everyone"
rep:privileges="{Name}[jcr:read]"/>
</jcr:root>

 

 

 

Avatar

Community Advisor

Could you please share the path of SVG which is not loading in publishers?



Arun Patidar

Avatar

Level 4

@arunpatidar @aanchal-sikka , The svg icon are loading in publish instance when we author form dam folder but not from DataSource dropdown list which is populated from servlet.

screenshot:

vkarthick_0-1694582583878.png

 

 

observations 1: When we author svg icon from dam folder and try to publish its listing as asset were we can see the svg icon.

vkarthick_1-1694582659480.png

Observation 2: When we author from DataSource dropdown list which is populated from servlet and try to publish its listing as asset where we can't see svg icon asset in list.

vkarthick_2-1694582952981.png

Note: currently migrating AEM on premise to cloud.

Avatar

Community Advisor

Hi @vkarthick 
Are you referring to the reference search?

Can you try publishing assets separately that was populating using datasource?

 

Also can you share the paths of the assets which are used in the page via dropdown, just to make user the paths also correct.



Arun Patidar

Avatar

Level 4

Hi @arunpatidar ,

SVG_BUNDLE_PATH = "/apps/settings/wcm/tatar/test/clientlib-site/css/resources/icons/default.svg";

Avatar

Correct answer by
Community Advisor

This is an apps path which is blocked in publishers(by dispatcher as well as publish permission)

You have to create a proxy cleintlibs here to fix this. 

 

/apps/settings/wcm/tatar/test/clientlib-site/css/resources/icons/default.svg

 



Arun Patidar

Avatar

Level 4

@arunpatidar , I'm already using the below property

allowProxy="{Boolean}true".

 

@arunpatidar Is it bcz of the below reason 

/apps/settings/wcm/tatar/test/clientlib-site and must be below /apps/settings/wcm/tatar/test/clientlib-site/resources to be served correctly on publish?????

 

@A_H_M_Imrul @arunpatidar do i need remove css folder???

Avatar

Community Advisor

You can try using clientlibs proxy servlet. 

<!-- css is the cq:ClientLibraryFolder -->
/etc.clientlibs/settings/wcm/tatar/test/clientlib-site/css/resources/icons/default.svg

<!-- clientlib-site is the cq:ClientLibraryFolder -->
/etc.clientlibs/settings/wcm/tatar/test/clientlib-site/resources/icons/default.svg

I'm assuming that the "css" node represents the cq:ClientLibraryFolder and that it has the "allowProxy" property set to "true." Nevertheless, if "clientlib-site" is the cq:ClientLibraryFolder, you should remove css folder. https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.htm... 

To access via the dispatcher, ensure that you include the clientlibs proxy servlet in your filter rules. Here is an example to allow clientlibs proxy servlet.

## Enable clientlibs proxy servlet
/0012 { 
  /type "allow" 
  /method "GET" 
  /url "/etc.clientlibs/*" 
  /suffix '(.*.css$|.*.jpeg$|.*.jpg$|.*.js$|.*.gif$|.*.png$|.*.svg$)' 
}

 

 

Avatar

Level 4

Yes, Publish permission issue, I had fixed by giving read permission for that folder in publish environment and also moved out of css folder.

Avatar

Community Advisor

To troubleshoot the issue, You can review the following steps:

1. Permissions: Ensure that the SVG images have the read permission to the anonymous user. You can validate this by logging in as an admin user. If it's a permission problem, SVG images should load correctly for the admin.

2. Content Replication: Verify that the SVG images are being replicated to the publish environment correctly. Again, you can inspect Asset folder while logged in as an admin user.

3. Dispatcher Configuration: If you are checking using Dispatcher, ensure that SVG images aren't blocked by any filter rules. You can verify by checking dispatcher.log file.

 

Avatar

Community Advisor

Hello @vkarthick 

 

I guess you would be accessing the pages via publish dispatcher.

Please try following:

  • Try accessing SVG via its DAM URL on publish/dispatcher
    • If its accessible means image is available on publish
  • Please check for any rewrite rules, which might be affecting SVG files.
    • Verify dispatcher logs for any rules blocking SVG
    • Verify publish logs, if the request is reaching there. And whats the URL of the SVG

Regards,

Aanchal


Aanchal Sikka

Avatar

Administrator

@vkarthick Do you find the suggestions from users useful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. 



Kautuk Sahni