Error 404 on any query url

When I try to add any query via the query manage to the site I get error 404.

Do I need to add something else on the routes??

http://localhost:3000/availability?building=edificio

If I goes to this

http://localhost:3000/availability

Works fine. As soon as I add a query 404 error.

On the routes panel is like this

Captura de Pantalla 2024-01-05 a la(s) 9.47.18

Does I am missing something?

Regards

++++++++

UPDATE:

Is a bug on the PHP Wappler internal server. I change my development server to a MAMP and works perfect.

The problem is when you add a query that is defined with ?variable=value at the end of the route.

That’s not the way parameters work with routing … your route should look something like this.

Screenshot 2024-01-05 at 9.06.41 AM

You are mixing routes and non route URLS in the same URL. That will give you a 404 every time.

but what about query manager that changes de url?? now if you add a query parameter at the end of the url goes to error 404.

You can’t add a parameter in the traditional sense. See this documentation. Scroll to the part regarding Advnaced ROuting with Parameters.

I think this time you are wrong. I have change my development server to a MAMP local and using the same routing that get problem in wappler server and works perfectly fine.

http://solanaweb:8866/availability?building=edificio1

You can use the tradicional way with routing.

I think the problem is that wappler is not using apache a traditional way.

You can’t mix routes and non-routes in the same URL. Please follow the documentation on URL Rewriting with parameters.

If thats the case you cant never use que query manager on the App connect? Because query manager modify the url . Or I am wrong?

You can use the query manager just fine,

Your URL would end up looking like where 1234 is your parameter value.

http:// solonaweb:8666/availability/1234

You can even have routes with multiple parameters.

What not make sense for me is that on MAMP works perfect and over Wappler php server dont.

I test the way that you say and works fine. But as you advice you cant mix traditional with routes. says error 404. But on MAMP work fine mixing.

Thanks god now i use Github that I havent use in the past and checkout the version before the server changes.

Thanks @brad

1 Like

Maybe I am wrong but I make a detailed testing and seems to not work perfectly.

On the page I create a query manager :

Captura de Pantalla 2024-01-05 a la(s) 12.22.29

Then I create a button that modify the query values.

Click on button and works fine and display info correctly but change at the same time the URL to. Automatically the query manager does this.

If you copy that link and reaload the page. ERROR 404

So I am in the same starting point. Until you dont reload the page works but once you click on button that modify Query manager, set value and reload breaks to 404 error.

May help to watch this

1 Like

Hi

I totally understand your video. The problem comes when you want to modyfy query values with Query Manager component. It generates a link that later if you copy you cant access anymore.

But this only happen on the Wappler internal php server not on MAMP. On MAMP works fine.

@Teodor what do you think?

Juan
I an not sure you do understand fully,you appear to be mixing legacy $_GET parameters like:
?building=edificio

With routing like;

http://localhost:3000/availability

In the above example the route should be:

http://localhost:3000/availability/:building

1 Like

Yes but later I want to modify the $_GET building value inside the page to get other results from recordset. I dont want to reload the entire page. Only the list of results.

I use the Query Manager component inside APP Connect. When I set the new values with the Query Manager, it automatically add ?building=newValue to the url.

The results seems to display correctly. But if the user copy that url and share with someone else got 404 error.

I dont know if I get explained.

Try to modify the values with query manager and later reload from that new url generated.

Maybe I understand wrong how to use it.

I think we are all confused by what you are saying. Perhaps show detailed screenshot of what you are doing and the problem?

1 Like

Ok, I have done some testing and it turns out I have done something similar to what you are doing. Although I can’t test on Wappler server I can confirm it works on MAMP and remote Apache hosting. I’m now thinking you may have discovered an issue with the Wappler local server compatibility.

This works fine in MAMP and Apache hosting.

Thanks @brad. I was getting frustrated that I cant explain what is happening.

I notice that if you add a dumb variable on the routes. The URL query string work but if you dont add any variable to the route URL query string not work.

I think this problem is related with this other one.

The notice error is fixed but the Functionality is not working.

I have posted a fix but it has not yet been incorporated into Wappler, you need to make the change manually until the next release (I assume next thursday)

Your fix only fix the Notice and Warning but not the functionality. You cant use a query string on URL until you add a variable in the Route if you dont add you cant access query string and mark as 404 error.