AEM SPA Routing Issues with hash and query parameter | Community
Skip to main content
viveksachdeva
New Participant
Jun 4, 2020 2:40 PM UTC
Solved

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.

E.g:

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?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
dzmitryk7401781Accepted solution
Level 2
Mar 22, 2021 1:52 PM UTC

17 replies

Level 2
Jun 7, 2020 8:09 AM UTC
So you are using extension less url ? and without looking at your Apache rewriter rule, it is difficult to say whats wrong in the rule
Translate
viveksachdeva
New Participant
Jun 7, 2020 4:01 AM UTC
Its Client side..
Translate
Level 2
Jun 6, 2020 7:42 PM UTC
Is this Client or Server Side react?
Translate