[Bug 44249] New: Debug options do not work on circulation or reports home pages
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44249 Bug ID: 44249 Summary: Debug options do not work on circulation or reports home pages Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Target Milestone: --- When on /cgi-bin/koha/circ/circulation-home.pl or /cgi-bin/koha/reports/reports-home.pl, the options in the debug menu do not successfully append anything to the URL and therefore don't disable JS/CSS/stylesheets. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44249 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Debug options do not work |Debug options do not work |on circulation or reports |on pages lacking footerjs |home pages | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44249 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |andrew@bywatersolutions.com |ity.org | Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org