SPA Editor React URL Shortening Issue | Community
Skip to main content
Level 2
Feb 10, 2021 10:31 AM UTC
Solved

SPA Editor React URL Shortening Issue

Hi All,

 

I have created project using archetype 23 for frontEndModule as react. I am using SPA Editor of AEM 6.5. I have created sling model for each SPA-Enabled component and used componentExporter. I am facing issue with SPA Editor, after URL shortening from https://projectName.com/content/projectname/en/home.html to   https://projectName.com/home

By adding dispatcher rules. I am getting blank page. 

I have tried to add vanity URL for the same pge as /home.html, I got same issue.

There is some issue with en.model.json. Previously I have added single page it was worknig but it was giving home.model.json and after adding more pages. The same page stopped working. In the network tab when I have checked, It has only wn.model.json not home.model.json.

 

Is it possible to access short url in SPA editor via dispatcher?

It it possible to have page specific model.json like home.model.json?

 

Please help me to resolve this issue.

Thanks in Advance,

Nasrin

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
nasrinj114Accepted solution
Level 2
Apr 14, 2023 2:51 AM UTC

this issue still exist for me. the accepted solution is not a solution at all.

 

Anyone has any information if this (url shortening via apache rules and resource-resolver config) is supported by adobe in AEM spa ?


https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-spa-react-dispatcher-setup/m-p/570927#M142612

Refer to this community post. I got solution from here.

5 replies

Level 3
Apr 6, 2022 2:23 PM UTC

Have you found a solution to this?

Translate
Vijayalakshmi_S
Level 10
Feb 11, 2021 4:14 PM UTC

Hi @nasrinj114,

React JS which is complied and available in AEM SPA project clientlibs is the starting point. In particular, call to en.model.json (Root page Model JSON) is initiated from React code - index.js.

Given this, can you confirm on the below,

  • If all related clientlibs of the project is loading fine(200) and no console errors when accessed from Dispatcher. 
  • If yes, call to en.model.json is success and response of the same contains your page content. 
  • Details of redirects(Is it via adache rewrite using mod_rewrite or /etc/mapping or URL mapping in Sling resource resolver config)

 

Translate
Level 2
Feb 15, 2021 1:04 PM UTC
@vijayalakshmi_s No console error is coming. All clientlibs are coming with 200. en.model.json is coming properly. I am using mod_rewrite.
Translate
Level 2
Apr 10, 2023 7:58 AM UTC

this issue still exist for me. the accepted solution is not a solution at all.

 

Anyone has any information if this (url shortening via apache rules and resource-resolver config) is supported by adobe in AEM spa ?

Translate