Expand my Community achievements bar.

While performing conversion of content from static template to editable template, JS files are throwing 404 on converted page

Avatar

Level 1

I am performing conversion of AEM pages from static templates to editable templates using AEM Modernization tool. After the conversion the JS files which are available under /apps/myproject/clientlibs folder are not loading for the converted page and throwing 404 error in preview mode.

I am including global clientlibs using <sly data-sly-call> command at template level in customheaderlibs.html. Below is the structure for the clientlibs:

MeghaGo_0-1728917330498.png

It is throwing below error in the converted page in view as published mode:

MeghaGo_1-1728917621659.png

If someone has faced similar issue, please help me out with this.

 

Topics

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

3 Replies

Avatar

Administrator

@Asutosh_Jena_ @Love_Sharma @Sudheer_Sundalam @SwetaB @Bhuwan_B @AsifChowdhury Curious to hear your perspectives on this question. Do you all mind sharing your thoughts?



Kautuk Sahni

Avatar

Community Advisor

Hi @MeghaGo 

It seems the clientlibs files are not present on the repository. Here are some steps that you can check first:

1. [If exists] Check on ui.apps.structure -> pom file that the filter exist for your project to the root

2. Check on ui.apps -> META-INF -> vault -> filter.xml - your clientlibs path exist on the filter or not like below:

 

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/apps/{project}/components"/>
    <filter root="/apps/{project}/clientlibs"/>
</workspaceFilter>

 


- Asif Chowdhury

Avatar

Level 1

Hi @AsifChowdhury ,

I am already following above two steps mentioned by you.

The JS files are loading fine for the pages before conversion. Also, after converting the pages the JS files are loading fine in editor mode but failing to load in preview mode.