AEM SPA Routing Issues with hash and query parameter



Hey guys,


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?


Accepted Solutions (0)

Answers (1)

Answers (1)





Try playing around with the dipatcher re-write rules if it helps.

We guys also implemented similar thing but didn't faced such issue.