anchor tag href value shortening inconsistently
Hi,
I am currently using AEM 6.5.13. I am trying to render some links using "href" in anchor <a> tag.
Sample code:
<a href="${slingObject.link}"/>
This link has 2 values coming from backend,
/content/marketA/index/pageA.html
/content/marketB/index/pageB.html
Now the href value comes in this format in BROWSER through dispatcher URL, which is clearly inconsistent
In case A, <a href="/content/marketA/index/pageA.html"/>
while in case B, <a href="pageB.html"/>
These markup are part of DOM loading on some other page hierarchy, say mysite.com which corresponds to /content path.
When I click on the links, the URL it tries to fetch is,
Case A: www.mysite.com/content/marketA/index/pageA.html response 200 and page renders
Case B: www.mysite.com/content/pageB.html response 404 and page does not renders.
In my opinion, the behavior should be consistent. I have tried following:
1. Check how it is being rendered in Author and Publish: Full path shows up in the DOM
2. Check what has been cached in the dispatcher: Full path again getting cached.
What could be the issue ?