Expand my Community achievements bar.

Overlay is not working

Avatar

Level 4

I've overlaid the file 

/apps/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp

and made some changes, but it's not picking up the overlayed file. Instead, it continues to reference the original file at

/libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp

I'm using Service Pack 16. Any help would be greatly appreciated.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Community Advisor

Hi,

The problem is that the file

libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp

is hardcoded and included in the following files:

  • libs/dam/gui/coral/components/admin/contentrenderer/card/asset/asset.jsp
  • libs/dam/gui/coral/components/admin/contentrenderer/column/asset/asset.jsp
  • libs/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp

Therefore, you must also overlay these files to ensure that your custom functionality is applied.

So, your overlay should look like this:

EstebanBustamante_1-1724767419911.png

Follow the below pattern with all the files i shared

EstebanBustamante_2-1724767475512.png

Now, you can check that the overlay is working:

EstebanBustamante_0-1724767308251.png

 


Hope this helps



Esteban Bustamante

Avatar

Community Advisor

@jerinraj5555 As my screenshot shows, the overlay is working. When you said it is not working for you, do you mean that you cannot get a simple logger statement like I did to confirm that the overlay is functioning? Or are you referring to a problem with your customization of the overlay?



Esteban Bustamante

Avatar

Level 4

Thank you for your response. Unfortunately, I'm still having issues. Would it be possible to get a package of your overlay nodes?

Avatar

Administrator

@jerinraj5555 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Community Advisor

Hi @jerinraj5555 
Please confirm these things  :

the overlay path exactly mirrors the path in /libs. The file structure in /apps must exactly match the one in /libs to successfully override the JSP file.

  • Original file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp

Overlayed file: /apps/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp

 

Ensure that the permissions for the /apps folder are set correctly. Sometimes AEM security restrictions prevent certain files in /apps from being used. You can check and adjust permissions in the CRX repository to ensure that your overlay is access. 


If you're using a dispatcher, it might be caching the JSP from /libs. Clear the dispatcher cache to ensure it's picking up the latest version from /apps.

Verify if the overlay is dependent on a sling

or other inherited components. If the original file in /libs is included via a resource type, it might bypass your overlay.

 

  • Check the sling:resourceSuperType property on the component you're trying to overlay.
  • Ensure there’s no fallback logic implemented in the component to use the original file

Check the error and debug logs (/crx-quickstart/logs/error.log and /crx-quickstart/logs/request.log) for any warnings or errors related to the JSP rendering. It might provide clues if AEM is having issues with your overlay.

Let me know if its worked or not ! 

Thanks