NodeJS SPA Internal Link '/' Converted to 'public' on Save

Wappler Version : 3.4.2
Operating System : Windows 10

Expected behavior

Setting a link to go to home page, i.e. /, should link to the home page.

Actual behavior

<a class="nav-item nav-link active" href="/" internal>Home</a>

Once I set the link to /, via code view, of the route picker UI. It shows correctly as above.
But, as soon as I save it, it gets converted to path as shown below:

<a class="nav-item nav-link active" href="../../public/" internal>Home</a>

How to reproduce

Created a fresh new project and followed the steps as given in this tutorial.
Additionally, I have changed the route of home content page to be just / instead of /home. This way, when I open the URL (eg: localhost:3000), the first thing I see is the home page.
Everything works fine until this point. But when trying to assign a link to route to /, it gets converted to ../public.. on save, as shown above.

I have another NodeJS project which I created prior to 3.4.2 and there I am able to set the route url as / without any issues in version 3.4.2. So not sure what I broken in the latest version that is not letting / be a route url for a new project.

@George Will this be fixed in today’s update?

or is there any new updates today?

I would think it is coming up shortly.

1 Like

I was getting this too, but wasn’t trying to use the SPA feature. I found the article about SPAs [Building SPA pages with NodeJS] and read the following:

(Building SPA pages with NodeJS)

When I experimented with SPA and set the Links Relative To to “Site Root”, reassigned the route to the link and saved, it was no longer href="../../public/" but instead it was href="/" as it should be.

This has been fixed in Wappler 4.2.1

This topic was automatically closed after 46 hours. New replies are no longer allowed.