Expand my Community achievements bar.

SOLVED

AEM SPA(React) not loading in publish instance

Avatar

Level 2

Hi,

 

 We're implementing AEM React SPA in our project. Page is loading fine in the author but not in the publisher. Page is empty and this is due to en.model.json not at all being fetched and failing with 404 status. cq:pagemodel_root_url attribute is populated with the right model json value in publish. Are we missing something here?  

 

Thanks,

Divya

1 Accepted Solution

Avatar

Correct answer by
Level 5

Do you have a dispatcher that's probably blocking model.json requests? Can you find if thats the case. And as a last resort compare infinity.json on en node in author and publisher.

View solution in original post

10 Replies

Avatar

Community Advisor

Do you see any browser console error? Can you post it if so?



Esteban Bustamante

Avatar

Level 2

Yes, I do see console errors and it is regarding the json not being loaded.

Divya_13_0-1689865261335.png

 

Avatar

Community Advisor

What happens if you hit directly in the browser that URL? do you have enough rights?



Esteban Bustamante

Avatar

Level 2

When i directly hit in the browser, it says "Not Found.The requested URL was not found on this server". Do I need to make any changes in ui.frontend module?

Divya_13_0-1689909169231.png

 

Avatar

Level 5

May be a bad question, but i will ask anyways. Is the en page published? And can you confirm anonymous access is not denied for this site?Also see if en.html is accessible from publisher just to confirm a blank page will load at the minimmum without returning 404.

Avatar

Level 2

Hi,

 

en page is published and I am seeing blank page . Anonymous access is also provided for the site.

Divya_13_0-1691394000387.png

 

Thanks,

Divya

Avatar

Level 5

If you have access to CRX on publisher, can you compare the en nodes between author and publisher? And see if the path to en node is accessible directly in CRX, and double click on the en node, and confirm if the html loads fine.

Avatar

Level 2

We do not have access to CRX on publisher. We are using AaaCS.

Avatar

Correct answer by
Level 5

Do you have a dispatcher that's probably blocking model.json requests? Can you find if thats the case. And as a last resort compare infinity.json on en node in author and publisher.

Avatar

Level 2

Thank you for your inputs.This issue is resolved now as it is a dispatcher issue. We have added filter rules to allow json requests.