Routing bug - php & wappler own server

Wappler 6.0.5
Windows 11
PHP
Wappler own server

I have a brand new site created with Wappler 6.0.5

when adding any routes i get the following error message in the browser window
(nothing more in dev console)

I have recreated the site twice to be sure but same result each time

route definition is basic

@Teodor
Problem is related to where a route has no parameter
I am using a workaround of adding an optional dummy parameter which stops the error

image

Because with the buildin php server we use php cli directly as server, we do not have Apache, so we are using a very simple php code to emulate htaccess routing. That code might need improvments indeed.

You can check the code if you want it is in the indicated path file called htaccess_router.php

any improvements are welcome :slight_smile:

changing line 34

parse_str($url_components['query'], $params);

to

 if (isset($url_components['query'])) {
        parse_str($url_components['query'], $params);
        }

seems to fix this (not extensively tested)

2 Likes

Just to echo I have the same issue as @Hyperbytes in 6.0.5 - I am running on a Mac - php v 8.2.

The solution works for me also.

The file to edit is not actually in your project folder. On a Mac you can right click on the Wappler Application icon and “Show package contents” - then browse to the path.

I think my problem is the same problem But I am on mac.

this was fixed in Wappler 6.1.0