Overlay is not working | Community
Skip to main content
jerinraj5555
New Participant
August 23, 2024
Question

Overlay is not working

  • August 23, 2024
  • 3 replies
  • 1428 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

partyush
New Participant
September 13, 2024

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

kautuk_sahni
Employee
September 13, 2024

@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
EstebanBustamante
New Participant
August 27, 2024

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:

Follow the below pattern with all the files i shared

Now, you can check that the overlay is working:

 


Hope this helps

Esteban Bustamante
jerinraj5555
New Participant
September 2, 2024

@estebanbustamante Thanks for the support. I tried the same thing, but it's not working.

EstebanBustamante
New Participant
September 4, 2024

@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