https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44249 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 212486 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212486&action=edit Bug 44249: Make debug menu work on pages without footerjs The debug menu script in js_includes.inc attaches its click handlers immediately. On pages that don't set footerjs (e.g. circulation-home, reports-home, tools-home), js_includes.inc is loaded in <head>, before the header markup exists, so no handlers are attached and the menu options do nothing. This patch defers the script until DOMContentLoaded so it works whether it is loaded in the head or the footer. Test plan: 1. Enable debug mode (KTD: koha-debug / debug_flag) so the bug icon appears in the staff interface header 2. Go to Circulation (circ/circulation-home.pl) 3. Click the bug icon and choose "Disable custom CSS" 4. Note nothing is appended to the URL 5. Repeat on Reports (reports/reports-home.pl) and Tools (tools/tools-home.pl), same result 6. Apply patch, restart_all and reload the pages 7. Repeat steps 3-5: the DISABLE_SYSPREF_* parameters are now added to the URL and the menu labels/icon colour update accordingly 8. Confirm the menu still works on a footerjs page such as the staff home page (mainpage.pl) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.