html is not getting append at end of the link in leading pages throwing 404 error | Community
Skip to main content
July 24, 2023
Solved

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

  • July 24, 2023
  • 4 replies
  • 2811 views

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 

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

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

 

4 replies

Shiv_Prakash_Patel
Community Advisor
Shiv_Prakash_PatelCommunity AdvisorAccepted solution
Community Advisor
July 24, 2023

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
arunpatidar
Community Advisor
Community Advisor
July 24, 2023

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

Arun Patidar
Pawan-Gupta
Level 8
July 24, 2023

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.

Nishant-Singh
Adobe Employee
Adobe Employee
July 24, 2023
  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.