Wappler Version : 4.4.4
Operating System : MacOS Big Sur
Server Model: NodeJS
Database Type: None
Hosting Type: Docker (for some reason it was initially setup with native’s NodeJS instead of Docker, though I’m almost sure I selected Docker during project creation, but whatever, maybe I did a mistake)
Expected behavior
SPA internal routing works
Actual behavior
- SPA internal routing broken (browser uses traditional page load instead)
- dmxRouting.js not automatically appended to master page
- Console says “Unknown component found! view”
- Home link in first navigation bar becomes this crazy href after saving the page (instead of “/”):
<a class="nav-item nav-link" href="../../../../../../../" internal>Home</a>
How to reproduce
I have attempted to create a test project, which you download below. This project was created to troubleshoot another issue with SPA internal routing, but it seems I found this bug instead. The 2nd bug report will be created after this one is solved, as otherwise I can’t attempt to replicate the 2nd bug since SPA routing is not working in first place
bootstrapNavigation.zip (8.3 MB)
Edit: To save time for the Wappler team, the 2nd bug is related to dmxBootstrap5Navigation.js: when SPA routing is used, the navbar(s) loaded through the SPA fragment are not marked with class “active”. This is a time-sensitive bug, because if you run _update() again the elements are properly marked as “active”. This is what the project above attached aims to demonstrate, hence one main navbar in the master page (Home), and two navbars added on other pages (About and Contact) - these “other pages” are to be loaded through HTML/SPA fragments