======== BUG REPORT ========
Wappler Version: 7.6.1
Operating System: Windows 11
Server Model: PHP
Database Type: MySQL
Hosting Type: Local development (Windows / Apache)
Expected behavior
The database query should return results when any single optional filter is provided.
The query is built using the Wappler Query Builder with multiple optional GET parameters (equal / contains conditions).
Each condition should only be applied when its corresponding GET parameter is present.
This behavior worked correctly in Wappler 7.4.1 or previous.
Actual behavior
After upgrading to Wappler 7.6.1, the query only returns results when two or more optional conditions are provided at the same time.
When only one GET parameter is set:
-
No errors are shown
-
Query executes normally
-
Result set is empty
When two or more GET parameters are set:
- Query returns results correctly
It behaves as if optional conditions have become mandatory.
How to reproduce
-
Create a Server Connect action using a Database Query (Query Builder)
-
Use multiple optional conditions, all based on GET parameters, for example:
-
work_tool_id = {{$_GET.work_tool_id}} -
operation_id = {{$_GET.operation_id}} -
function_id = {{$_GET.function_id}} -
sector_id = {{$_GET.sector_id}} -
product_reference_id = {{$_GET.product_reference_id}} -
Several
contains(LIKE) filters using GET parameters
-
-
Ensure all conditions are optional (no required parameters)
-
Execute the query with only one GET parameter
No results returned
-
Execute the same query with two or more GET parameters
Results returned
-
Repeat the same steps in Wappler 7.4.1
Works correctly with a single parameter
Additional information
-
Backend: PHP
-
Database: MySQL
-
No query or validation errors are shown
-
Generated SQL combines all optional conditions using
AND -
Issue started immediately after upgrading to Wappler 7.6.1
-
Tested logic worked correctly in previous version
If needed, I can provide screenshots of the Query Builder configuration and the generated SQL.
