AEM SPA - Rewrite URL with Query Parameter not loading coz of incorrect .model.json call

Avatar

Avatar
Level 1
Gunjan_13
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
Gunjan_13
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile
Gunjan_13
Level 1

29-06-2021

We are in SPA with React implementation. 

We have product and category pages in our site which are being rendered dynamically. Hence, in AEM we just have one page for rendering category or product.

So, the actual page URL is  /en/category/categoryName but, using rewrites I have mapped it to /en/category.html?key=categoryName. But on dispatcher  I see there are 2 calls being made

en.model.json

categoryName.model.json

And, coz of this the page is not loading on dispatcher. Is there anyone else who faced this issue ? 

 

Dispatcher Log Entry -- >

/en/category.html?key=categoryName.model.json  

 

Env - AEM Cloud 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

246 likes

Total Posts

410 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

246 likes

Total Posts

410 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile
shelly-goel
MVP

01-07-2021

@Gunjan_13  Please refer to below where the similar issue is discussed.

You have two options:

1. Either you could fix :path property https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-spa-react-dispatcher-s...

2. or I would suggest to use selector (/en/category.categoryName.html) to serve all category pages with single aem page. This would not require you to have a rewrite rule

Answers (0)