Routes shown incorrectly

Wappler v3.5.7
Win 10 20H2
It’s a PHP SPA.

been working on this project for about 10 months now, client had made the project a few months even before that.
we share the code between client and myself via client’s self-hosted GIT repository. we started using GIT about 3 months ago only before that we were just using a shared OneDrive folder to share the code to work async!

have added a lot of pages over the months - all works good on the browser, no issues.

but on the Wappler side we have a couple issues:
1
this is the route list that the client sees - these were added by the client themselves.

i do not see these routes in my routes pane. what i see is a handful of routes that i had created on my machine:

had to blur - coz sensitive - but the huge distinction in list size itself will give an idea of the problem!!!

i confirm this is the very same GIT repository.

2
there is a lot of weird duplication on .htaccess - since everything works as expected on the browser - it’s not a critical problem - but good to have a clean .htaccess file!

not sure when exactly this routes thingy broke for us! have been seeing this for a couple months now at least - hadn’t just raised the issue earlier!

it’d be great to fix this bug for good on Wappler level.
if that is not the issue - pls guide how we can fix it up for our setup.

thank you.

Routes are loaded in the routing panel UI by reading the routes.json file not by reading the htaccess directly.
So you will need the routes.jaon file created on the other computer to be able to see the same routes. This file is located in the hidden . wappler folder in your project root

yeah, i did check on that.
.wappler folder is hidden and also added to .gitignore. hence it doesn’t sync up over GIT for us.
did a copy of the JSON from client’s routes.json to my machine - but that did not work. still seeing the 4 items only on my machine!
is there another flag/setting elsewhere?

This should fix the issue - are you sure you restarted Wappler after that?
Have you checked the content of the json file and is it what you expect?

Hadn’t restarted wappler
Let me try that again.

after restart it works.

is it safe to remove .wappler folder from .gitignore so that the routes get synced up via GIT?
or am i missing something here?

The .wappler folder contains info like the targets you’ve setup for your project, connections etc.
If you are working with private repositories you should indeed commit the .wappler folder as well. Especially if you are working on multiple computers / in a team.

1 Like

Hi @Teodor,
this is the way I‘m doing it (commit .wappler).
I now found a problem doing this.
I have 2 Macs I‘m working with. My problem is that the working directory (local folder) is different on both Macs. On commit it always overwrites the correct working directory.
Is there a workaround for this?

It should be safe to commit .wappler folder. Actually on a new projects we no longer add it to .gitignore

Also all paths in it are project root relative, so there shouldn’t be any problems in checking out in different paths.

2 Likes

This is what I get on commit of the project.json:
old:


new:
Did I something wrong?

Weird localFolder shouldn’t be there at all as we don’t use it for a long time already.

Is this an old project?

a couple of month. Did it change?
I saw this after getting my project from GitHub to import it on my new Mac mini M1,

Aha maybe it was left by the import - but it isn’t used further so don’t worry about it.

I will make sure it is cleaned in the next update

1 Like

Hi @George,

I have to add to my problem that if I go to the project settings on my second Mac after pulling from remote GitHub I get the following:

This is the local folder of my first Mac. Does this happen because it’s an older project?