https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260

--- Comment #424 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 209079
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209079&action=edit
Bug 33260: (QA follow-up) Second review fixes

* tools/notices.tt did not load the Koha plugin but used Koha.CSPNonce, so
  with a content security policy in force the style that hides the notice
  frames was blocked and every notice was displayed in the table.
* tools/notices.pl listed every notice in the queue, and the page renders
  each one, so a search without filters on a busy system could not be
  displayed. List the most recent 1000 matches and say so when there are
  more.
* The per-template styles in the print page were scoped with a
  regular expression that dropped @media blocks. Scope them in
  Koha::Notice::Message->scoped_template_style with the same CSS scoper as
  the transport styles, which now also scopes the rules of @layer and
  @container, splits selector lists on their top level commas only and
  maps html, body and :root to the notice container.
* Koha::Notice::Messages->search_limited returns nothing when the logged in
  patron cannot be found instead of everything.
* Give the notice frames a title, translate the messages of the print page,
  drop an unused template parameter, end userpermissions.sql with a newline.
* Tests: cover the above, and the missing 'use' lines; the "no logged in
  user" test used a mocked user number that could exist.

To test:
1. Run the unit tests inside KTD:
     ktd --shell --run 'prove t/db_dependent/Koha/Notice/Message.t'
2. Set a style such as
     @media print { p { color: blue; } } body { background: #eee; }
   on a notice template that has been used to generate a print notice,
   print that notice from Tools > Notices management and confirm in the
   page source that the rules are scoped to the notice and the @media
   block is intact.
3. Confirm Tools > Notices management loads without content security
   policy errors in the browser console.
4. Sign off

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to