Query Report filter collapse button throws JavaScript error
In Frappe v16.32.0, clicking the filter collapse/expand button in a Query Report causes a JavaScript error in the browser console.
The issue was observed in the General Ledger report.
Steps to Reproduce Open General Ledger. Locate the triangle/collapse button next to the report filters. Click the button to expand the additional filters. Check the browser console. Actual Result
The following JavaScript error is thrown:
Uncaught TypeError: can't access property "css", this.check_filter_area is undefined
toggle_filter_visiblity query_report.js:628
add_collapse_button query_report.js:646The error occurs because this.check_filter_area is undefined when toggle_filter_visiblity() attempts to call .css() on it.
Expected Result
The filter collapse/expand button should work without throwing a JavaScript error.
The button should toggle the visibility of the additional filters:
First click → expand/show the additional filters Second click → collapse/hide the additional filters Further clicks → continue toggling between the two states Observed In
Frappe: 16.32.0 Report: General Ledger
The issue appears to be related to the common Query Report filter collapse/expand functionality rather than the General Ledger report itself, since the error originates from query_report.js.
The same behavior should be checked in other Query Reports that use the filter collapse/expand button.
Source: frappe/frappe