Routing broken in latest update

Wappler: 7.7.2
OS: MacOS Silicon
Server: PHP

I initially switched on the experimental feature ‘Enable PHP Routing Layouts’ but I’ve now switched it off again.

Comparing the .htaccess file with the one in my latest Git repo I can see that the .php extension on all the URLs has been removed.

This is one of the routes as it now is:

And this is how it should be and how it was previously:

Am I doing something wrong or is this a bug? It means I can’t make any routing changes as it rewrites the .htaccess file. Fortunately I have the git backup!

Welcome to the new world. This is how NodeJS has worked from day one. Great to see that PHP is catching up, with thanks to the Wappler Team.

But, if what you are saying is correct: "opting out of the experimental feature off does not revert to the original .htaccess", then that's the bug.

Thanks Ben.

I would be amazed if I’m the only person who’s experienced this and it’s forced me to halt on a project because as soon as I touch the routing I end up with a broken site. I keep having to replace the .htaccess file with the backup.

Hopefully the team will get back to me soon.

1 Like

Is this a SPA site or are these regular full PHP pages?
What happens if you simply reselect your php page in the Url option? Have you run the project updater so that all new files are copied to the project?

It’s not a SPA, it’s a regular site with full PHP pages. The routing is there for friendly URLs.

I have now switched off the experimental feature and if I edit the route it does correctly store it so the .php is there. I have a lot of routes so I’m guessing I need to go through and reset them all?

I may be able to roll back to a previous version from git.

We found the issue and it will be fixed in an update today.

So I know, if I enable the experimental feature for routing but continue with projects which used the old method, will they break? Will I need to update them all to the new method or switch the option off?

I’m hoping the option can be there so it’s available if/when wanted but doesn’t impact anything if it’s ignored.

Can you confirm this for me?

Great idea! We will enable that in the update - so you can enable it per project only and leave the global off

1 Like

Fixed in Wappler 7.7.3, also now you can set this per project

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.