Sign in to Community
Sign in to view all badges
We are using AEM with React and having trouble with SPA Routing. We are facing an intermittent issue when the Link contains # or ?
Page data is available using .model.json on the page URI but sometimes when we have # and ?, model.json is added after full URL rather than just path and hence it fails.
And it happens when on dispatcher only when we dont have .html in the URL.
Lets say a React Link points to /en/mypage?cid=campaign
I expect data call for this to be /en/mypage.model.json but sometimes it is sent as /en/mypage?cid=campaign.model.json
This logic is abstracted in the node module and hence difficult to check. Anyone else faced similar issue?
We've prepared patch to fix it: https://github.com/adobe/aem-spa-page-model-manager/pull/54
@viveksachdeva Try playing around with the dipatcher re-write rules if it helps.We guys also implemented similar thing but didn't faced such issue.
We also have the same issue appearing, right after we started to rewrite URLs removing `.html` bit in a page path.
Looks to me that URL parsing code in the routing library contains a bug for the case of absent page extension and should be fixed.