Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

SPA Editor React URL Shortening Issue

nasrinj31078225
Level 2
Level 2

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

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @nasrinj31078225,

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)

 

View solution in original post

2 Replies
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @nasrinj31078225,

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)

 

View solution in original post

nasrinj31078225
Level 2
Level 2
@Vijayalakshmi_S No console error is coming. All clientlibs are coming with 200. en.model.json is coming properly. I am using mod_rewrite.