Open AChris07 opened 1 year ago
Any update on how to tackle this problem? We are also facing this problem when we started URL shortening and for homepage when accessing with '/' it is behaving differently. Is there a way if we can override ModelRouter.ts so that it handle the browser path with '/' ?
@nitin2io A bit of a delayed response, but we've ended up setting the home page as /home
and using a redirect. That side-stepped the issue and has worked great so far. It'd be great to get some more context on why it's not supported however.
Describe the bug With SPA client-side routing implemented, on a Published page, any time a user tries to navigate to the current site's Home path ("/", ie.
https://www.example.com/
) from any other given page, the model.json is not fetched, causing the page to go blank.Package version
1.3.11
To Reproduce
Populate a given page in a site with a
Link
(ie. via a custom component)Publish the site
Navigate to said page
Try to use the
Link
to redirect to HomeExpected behavior The
.model.json
should be fetched, and the page correctly populated with the Home page contentActual behavior The
.model.json
file is never fetched, and the page goes blankScreenshots Will be adding these shortly.
Additional context Based on our initial investigation, it seems this might be explicitly set, as shown here: https://github.com/adobe/aem-spa-page-model-manager/blob/948895dc1077e734d23848cc13eadad9a2c68ca1/src/ModelRouter.ts#L174-L179
However, there's no context on why that is, and this seems to be a common enough use-case that should be supported.