[Bug 37205] New: Printing patron cards causes error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37205 Bug ID: 37205 Summary: Printing patron cards causes error Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: cubingguy714@gmail.com QA Contact: testopia@bugs.koha-community.org To recreate: 1. Go to Tools -> Patron lists 2. Create a new patron list 3. Populate with patrons 4. Go back to Tools -> Patron lists 5. Find your list, click on 'Action' and select 'Print patron cards' 6. Use browser dev tools to see error jquery-3.6.0.min_24.0600008.js:2 GET http://localhost:8081/cgi-bin/koha/patroncards/print.pl?csrf_token=1222474d665d5fe8bc17f7ff3c321feb404279c1%2C6447ff3c0650e78a6529508001b489d1ad3df6ac%2C1719427013&op=cud-export&referer=%2Fcgi-bin%2Fkoha%2Fpatron_lists%2Flists.pl&patronlist_id=1&template_id=23&layout_id=20&layout_back_id=0&start_card=1 403 (Forbidden) -- 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=37205 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=37205 --- Comment #1 from Sam Lau <samalau@gmail.com> --- Created attachment 168184 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168184&action=edit Bug 37205: Fix printing patron cards from the patron lists page This patch allows for the printing of patron cards from the patron lists page. Previously when attempting to do this, some errors show up, saying : "Programming error - op 'cud-export' must not start with 'cud-' for GET ...". To fix this issue, rather than send this info as a GET request, we can send it as a POST request to print.pl and extract the correct html code. To test: 1) Go to Tools -> Patron lists 2) Create a new patron list 3) Populate with patrons 4) Go back to Tools -> Patron lists 5) Find your list, click on 'Action' and select 'Print patron cards', then select "Export" 6) Notice infinite load as well as error in dev tools 7) Apply patch 8) Go back to your patron list and attempt to print patron cards again. 9) When you select "Export" this time, it should load properly giving you a pdf of the patron cards like requested. -- 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=37205 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |samalau@gmail.com Assignee|koha-bugs@lists.koha-commun |samalau@gmail.com |ity.org | -- 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=37205 Eric Garcia <cubingguy714@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=37205 Eric Garcia <cubingguy714@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168184|0 |1 is obsolete| | --- Comment #2 from Eric Garcia <cubingguy714@gmail.com> --- Created attachment 168215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168215&action=edit Bug 37205: Fix printing patron cards from the patron lists page This patch allows for the printing of patron cards from the patron lists page. Previously when attempting to do this, some errors show up, saying : "Programming error - op 'cud-export' must not start with 'cud-' for GET ...". To fix this issue, rather than send this info as a GET request, we can send it as a POST request to print.pl and extract the correct html code. To test: 1) Go to Tools -> Patron lists 2) Create a new patron list 3) Populate with patrons 4) Go back to Tools -> Patron lists 5) Find your list, click on 'Action' and select 'Print patron cards', then select "Export" 6) Notice infinite load as well as error in dev tools 7) Apply patch 8) Go back to your patron list and attempt to print patron cards again. 9) When you select "Export" this time, it should load properly giving you a pdf of the patron cards like requested. Signed-off-by: Eric Garcia <cubingguy714@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37205 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Signed Off |Patch doesn't apply --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Doesn't apply cleanly anymore, likely because of Bootstrap5 changes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37205 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- This now works for me without the patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37205 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |RESOLVED Resolution|--- |WORKSFORME -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org