I think this issue has been raised before but I am unable to find the post. So re-posting it.
When I open my app in browser, and click a few links which redirect me to other parts of the app, all works fine. No issues at all.
Also, when I press browser back, and go to previous pages, then go forward and then go back again etc… all worked well. Even refreshing pages works fine.
The issue arises when, say, I navigated a few times back-and-forth, and then I go to some other page in the app by writing it out in the address bar. The page is loaded fine again, but when I press browser back, the previous page is shown as plain HTML without any layout page nor any CSS etc.
Interestingly, if I do a refresh here, not only the page loads up correctly (as expected)… but it also allows me to go forward to the URL that I had entered in the address bar - and that page again opens perfectly fine.
I get exactly the same issue. The bug come when I go back with the browser after navigating using an internal link and then manually go to an url by typing the location in the bar.
For example:
/
/bench
/bench/5
/bench/456 by typing the address in the browser manually
press back button => page is unstyled, not parsed (I see {{myvar.value}} for example) and in network tab I see that the page I receive contain <!-- Wappler include ... --> so I don’t have the full page with the layout just the content page.
I have one layout, some partials and content page.
EDIT: The bug don’t occured when I do:
/bench/8 by typing the address
/bench/546 by typing too
then pressing back here don’t trigger the issue
EDIT 2: I’ve tried to delete internal option on links but it doesn’t fix anything
EDIT 3: The bug is triggered too if i don’t use routes with parameters:
/
/bench manually
back here trigger the bug
EDIT 4:
My routes are bound to a layout (handle header, get serverconnect translations, etc), a content page and a server action (restrict the page to authentified user)