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)
Created attachment 168184 [details] [review] 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.
Created attachment 168215 [details] [review] 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>
Doesn't apply cleanly anymore, likely because of Bootstrap5 changes.
This now works for me without the patch.