We are developing a SPA site in AEM and its come time to test the app on our testing dispatcher environment but the app doesn't load anything from the model on dispatcher.
There's no issues with it working on Author or Publisher.
I can see the call to "en.model.json" producing a 200 and can open the model url no problem and see the content but the app itself just produces a white page.
We have path shortening on via mappings and the dispatcher settings but I have it turned off for *.model.json as the React app is requesting the long path (/content/site/en.model.json).
Are we missing something here? Is there any way to troubleshoot this? Console is clean, error log is clean and dispatcher logs are all clean.
Could you please check the request log from publishers to make sure the mapping is correct and publishers receive the correct paths to return the content?
I am seeing the correct paths in the request log.
The page loads an empty spa-root
<div id="spa-root"><div><div class=""><div></div></div></div></div>
Hi @gregy68980908 ,
As you have turned on short urls, I doubt on the model.json response - can you please compare model.json response on Publisher(where page is loading) and on dispatcher(where page is not loading). I suspect the :children might be returning short urls as well. Can you turn off the url shortening for once and try fetching the page via dispatcher ?
Because, URL shortening is still pain area for SPA editor websites in AEM & generally, custom shortening lead to such issues.
Hey @milind_bachani ,
It looks like the models for both publisher and dispatcher match, they use the long path for the children:
Which i guess is fine for publisher but the dispatcher url is shortened to :
I assume I need to shorten the paths inside the model as well to work? Is there a way to do this?
ahh, so @gregy68980908 you model path and your actual URL path should match in order to work.
Either you override the model to give short path for all relevant properties, or remove the url shortening completely in order to make it work.
I hope you havent used any apache rewrites for shortening too!
I have the solution for this for anyone searching:
to make the model match the shortened url. Then the model will load.