Expand my Community achievements bar.

SOLVED

html is not getting append at end of the link in leading pages throwing 404 error

Avatar

Level 1

Hello All,

 

We are having issue in AEM 6.1 version after our last deployment,
We are having a static component which contains a pathfield to author links.
When we select a path here, it used to append .html by default but after last deployment, we started seeing issue that html is not coming up for the link. Kindly let us know if you seen this issue earlier and let me know resolution.

@gskulkarni 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @venkata_siripalli ,

You can use @extension ='html' to  append the html.

<a href="${item.path @ extension = 'html'}">${item.name}</a>

Appending html extension to pages selected via pathbrowser 

AEM 6.5: HTL @ extension = 'html' 

Regards,

Shiv

 

Shiv Prakash

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @venkata_siripalli ,

You can use @extension ='html' to  append the html.

<a href="${item.path @ extension = 'html'}">${item.name}</a>

Appending html extension to pages selected via pathbrowser 

AEM 6.5: HTL @ extension = 'html' 

Regards,

Shiv

 

Shiv Prakash

Avatar

Community Advisor

can you check if you had removed the sling mapping for that or did you had any custom implementation for that?



Arun Patidar

Avatar

Level 9

OOTB pathfield doesn't append ".html" and you might have custom implementation either sling side override or a listener at dialog which may have been overridden because of last deployment. check that.

Avatar

Employee
  1. Check Sling Resource Resolver Configuration: Ensure that the Sling Resource Resolver configuration in your AEM instance is properly set to include the ".html" extension for pages. The configuration can be found in the AEM Web Console (http://localhost:4502/system/console/configMgr). Look for configurations related to the "Apache Sling Resource Resolver Factory" or "Apache Sling Resource Resolver."

  2. Verify Mapping Rules: Confirm that the mapping rules in the Sling Resource Resolver configuration are correctly set to add the ".html" extension for pages.

  3. Verify Custom Code and Deployment: If you have any custom code or components that modify URL handling, ensure that they are not interfering with the default behavior of appending ".html" to links.