[Bug 38089] New: Fix incorrect regular expression from bug 33478
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Bug ID: 38089 Summary: Fix incorrect regular expression from bug 33478 Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Depends on: 33478 The regular expression introduced in bug 33478 outright replaces all CSS selectors in your local styles. This means that whatever styles you've defined will be applied to ALL elements of the notice template and not the specific one's you're attempting to target. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33478 [Bug 33478] Customise the format of notices when they are printed -- 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=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33260 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260 [Bug 33260] Show message queue on staff interface and make notices printable -- 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=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.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=38089 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- We should replace it with: [% slip.style.replace('([^\{\}]+?)\s*\{', '#slip_' _ slip.id _ ' $1 {') | $raw %] This will prepend the $slip_ID selector to any and all local selectors instead of replacing them -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- I also propose moving the <style> tags up into the <head> where they belong, as not all browsers support such tags inside the <body> and it's against the HTML standard to have them there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz, | |aspencatteam@clicweb.org, | |caroline.cyr-la-rose@inlibr | |o.com, | |katrin.fischer@bsz-bw.de, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 172380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172380&action=edit Bug 38089: Move style to head and correct regular expression This patch moves the local style sections from the body to the head where they belong and it also updates the regular expression used to prepend the slip_id id to css selectors rather than replace them -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix incorrect regular |Fix incorrect regular |expression from bug 33478 |expression from bug 33478 | |and move styles to head -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Nick Clemens (kidclamp) <nick@bywatersolutions.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=38089 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172380|0 |1 is obsolete| | --- Comment #4 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 172421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172421&action=edit Bug 38089: Move style to head and correct regular expression This patch moves the local style sections from the body to the head where they belong and it also updates the regular expression used to prepend the slip_id id to css selectors rather than replace them To test: 1 - Create a new notice in the 'Patron (custom slips)' module called 'Testing' 2 - Set print content as: Try the <span class="styled">styling</span> stuff. 3 - Set the 'Format' as: .styled {color:red;font-weight: bold;} 4 - Set system preference IntrnaetSlipPrinterJS to "//test" http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetSlipPrinterJS This will prevent auto printing popup 5 - Go to a patron and click Print -> Print Testing 6 - Note incorrect styling 7 - Apply patch, restart all 8 - Print Testing again 9 - Confirm styling is correct -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 --- Comment #5 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 172422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172422&action=edit Bug 38089: (QA follow-up) Ensure style works on members/printslip.pl When moving the style up, it was moved before the code that handles printing a single slip, i.e. taking the variables and forming a slip hash. This patch moves that code to the top and additionally passes through the CODE of the notice so the ID is not blank -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172421|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 172464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172464&action=edit Bug 38089: Move style to head and correct regular expression This patch moves the local style sections from the body to the head where they belong and it also updates the regular expression used to prepend the slip_id id to css selectors rather than replace them To test: 1 - Create a new notice in the 'Patron (custom slips)' module called 'Testing' 2 - Set print content as: Try the <span class="styled">styling</span> stuff. 3 - Set the 'Format' as: .styled {color:red;font-weight: bold;} 4 - Set system preference IntrnaetSlipPrinterJS to "//test" http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetSlipPrinterJS This will prevent auto printing popup 5 - Go to a patron and click Print -> Print Testing 6 - Note incorrect styling 7 - Apply patch, restart all 8 - Print Testing again 9 - Confirm styling is correct Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172422|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 172465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172465&action=edit Bug 38089: (QA follow-up) Ensure style works on members/printslip.pl When moving the style up, it was moved before the code that handles printing a single slip, i.e. taking the variables and forming a slip hash. This patch moves that code to the top and additionally passes through the CODE of the notice so the ID is not blank Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 172473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172473&action=edit Bug 38089: (follow-up) More fixes for errors in original submission The original submission missed a number of slip types that are print on demand without queueing. These all need an "id" passing in to the template and in some cases we were also missing passing in the new style parameter too (preservation) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Strictly speaking we are missing either a SO or a QA person here ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.06 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to main |Pushed to stable --- Comment #11 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to oldstable |Needs documenting --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 33478 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38089 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #13 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Internal architecture, nothing to add/edit in the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org