Paged Query Offset Parameter Bug

Wappler Version : 4.9.0
Operating System : Windows 11
Server Model: NodeJS
Database Type: MySql
Hosting Type: Docker

Expected behavior

When adding a custom variable for a paged query’s offset parameter, that it would use this variable with no problems.

Actual behavior

This is the payload.

image

This is the response. Notice the limit. Regardless of the payload, it is ALWAYS 25.

image


I DO HAVE TO STRESS, when using the standard $_GET.offset variable, this works perfectly, even with a custom limit variable. When you change the $_GET.offset variable to, for example, $_GET.logs_offset, the above happens.

How to reproduce

Just create a paged query, then change the variable for the offset parameter. When changing the query params from, say, a select element, nothing will happen. The payload is correct, however the ServerConnect query comes back with a limit of 25, always.

Cheers
Michael

Well, the parameters for the offset and limit have default values - offset and limit, otherwise you will have to change them here as well:

Screenshot 2022-05-12 at 11.48.47

Just select the new GET vars you are using.

That’s exactly where I’m talking.

Limit works fine. But once Offset is changed, it all breaks.

You mean once the GET variable is changed in the UI or once the limit value changes?

So this works perfectly.

image

This is broken.
image

I’ve tried in two separate API files and the same thing occurs.

I suppose this is only a problem when you have multiple paged queries in a single API, because you’ll need more variables.