https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40968 --- Comment #6 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 203839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203839&action=edit Bug 40968: Pass weight_search to template in advsearch path The 'Edit this search' link correctly passes weight_search and whole_record parameters in the URL (thanks to bug 40966), but the advanced search form doesn't pre-fill the 'Apply field weights' checkbox because weight_search is not passed to the template in the advsearch exit path. The template logic checks: [% IF weight_search_submitted && !weight_search %] to uncheck the box, but weight_search was never set, so the checkbox always appeared unchecked when editing a search. This patch passes weight_search from the CGI params to the template in both catalogue/search.pl and opac/opac-search.pl. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Test plan followed: 1. Launch KTD with `ktd --search-engine es9 up`. 2. Set the system preference ElasticsearchMARCFormat to searchable array. 3. Reindex by running `koha-elasticsearch --rebuild -d -v kohadev` in the KTD shell. 4. In the staff intranet, navigate to advanced search, and click "More options". 5. Enable both "Search entire MARC record" and "Apply field weights to search" and make a search for "perl". 6. Click "Edit this search", and note the "Apply field weights to search" does not retain its value. 7. Apply patch and repeat steps 4-6. 8. Verify the "Apply field weights to search" checkbox now correctly retains its value. Signed-off-by: Olivia Reynolds <olivia.reynolds@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.