This parameter is used as an input parameter in a server action to query and bind dynamic data to the page.
Navigating to the path?[user_id]=[id] (path?id=21 i.e.) works fine and shows correct data, filtered by the query parameter. The server action in the console under XHR is named get_user?id=21 then.
Although I also setup routing rules for the same parameter, navigating to path/[id] results in a status 500 error in the console for the server action named get_user in XHR:
Undefined binding(s) detected when compiling FIRST. Undefined column(s): [users.id] query: select * from "users" where "users"."id" = ? limit ?"
These are my routing rules:
Am I missing something here or doing something wrong?
Hope bugs like these can be solved soon after the summer break.
I am sure you agree that some of them (like this one and others like the csv import bug) are quite critical functionalities for many Wappler user’s projects. Looking forward to the first update after the summer break!
Was there a meta tag in the code? It should be generated when creating a route.
When missing add it in code view on the content page (not on the layout page). Important is that the name is ac:route and the content is the path as defined in your route.
If the meta tag is missing then the route is not being parsed on the page and the parameters will not be available.
I think it is just that the meta tag is not being generated that causes the problem, we will investigate that and fix it.
There was no meta tag in the code, so it wasn’t generated when creating the route I suppose.
Adding the meta tag manually in the content page didn’t solve the issue either, unfortunately. I am sure I entered “ac:route” as the meta tag name and the exact path from the routing rule as the content value: <meta name="ac:route" content="/profile/:user_id">
Removing and adding the routing rule again didn’t fix the issue and the meta tag was indeed not automatically added to the content page’s code.
Query manager is only required when you want to change a query param value.
If you just want to read the value, you don’t need to add query manager on the page. You can just use the values returned under query.