[Bug 43887] New: Checkout warning block has empty id instead of circmessages
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43887 Bug ID: 43887 Summary: Checkout warning block has empty id instead of circmessages Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Depends on: 38714 Target Milestone: --- On the checkout page (circ/circulation.pl), the block that holds the "Cannot check out!" warning (and the on-site-checkouts-only attention message) should have id="circmessages". Since Bug 38714 it renders id="" instead. circulation.tt sets a variable div_id to 'circmessages' in each branch, but the div is then written as: <div id="[% circmessages | html %]" class="[% div_class | html %]"> i.e. it outputs the (undefined) variable circmessages instead of div_id. Consequences: - Custom IntranetUserCSS / IntranetUserJS that target #circmessages (it worked up to 24.11) no longer match. - The staff stylesheet rule for #circmessages (card styling: padding, bottom margin, white background) no longer applies to this block. With the id the block has 1rem padding, 1rem bottom margin and a white background; without it, 0.4rem padding, no margin and a transparent background. - The page emits an invalid empty id attribute. Affects 25.05 and later, including main. Test plan: 1. Have a patron who cannot check out (for example add a manual restriction to a patron). 2. Go to the checkout page for that patron. 3. Inspect the "Cannot check out!" block: the div has id="" and no card styling (no white background, tight padding). 4. Apply the patch and reload. 5. The div now has id="circmessages", and it has padding, bottom margin and a white background. 6. Optionally enable OnSiteCheckouts and OnSiteCheckoutsForce and confirm the attention variant also has id="circmessages". Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38714 [Bug 38714] Adjust templates for prettier -- 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=43887 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 208737 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208737&action=edit Bug 43887: Fix empty id on the checkout warning block circulation.tt sets div_id to 'circmessages' but then renders the block with id="[% circmessages | html %]", which is an undefined variable. The "Cannot check out!" block therefore gets id="" since Bug 38714. This breaks custom CSS/JS targeting #circmessages and the staff stylesheet rule for #circmessages (card styling). Output div_id instead. To test: 1. Have a patron who cannot check out (for example add a manual restriction to the patron). 2. Go to the checkout page for that patron. 3. Inspect the "Cannot check out!" block: the div has id="" and no card styling (no white background, tight padding). 4. Apply the patch and reload. 5. The div has id="circmessages" and now has padding, bottom margin and a white background. 6. Optionally enable OnSiteCheckouts and OnSiteCheckoutsForce and confirm the attention variant also has id="circmessages". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- 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=43887 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- 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=43887 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43887 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43887 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #208737|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43887 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 208761 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208761&action=edit Bug 43887: Fix empty id on the checkout warning block circulation.tt sets div_id to 'circmessages' but then renders the block with id="[% circmessages | html %]", which is an undefined variable. The "Cannot check out!" block therefore gets id="" since Bug 38714. This breaks custom CSS/JS targeting #circmessages and the staff stylesheet rule for #circmessages (card styling). Output div_id instead. To test: 1. Have a patron who cannot check out (for example add a manual restriction to the patron). 2. Go to the checkout page for that patron. 3. Inspect the "Cannot check out!" block: the div has id="" and no card styling (no white background, tight padding). 4. Apply the patch and reload. 5. The div has id="circmessages" and now has padding, bottom margin and a white background. 6. Optionally enable OnSiteCheckouts and OnSiteCheckoutsForce and confirm the attention variant also has id="circmessages". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43887 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes the patron release notes| |checkout page when a patron | |can't checkout items (for | |example, when they have a | |restriction). The "Cannot | |check out!" block is now | |correctly styled and has: | |- an id="circmessages" (the | |id was missing for the div) | |- padding | |- bottom margin | |- a white background | |(blended into the | |background before the fix) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org