Koha-clms/C4
Matthias Le Gac 0a51460e2c
Bug 34157: Exporting labels as a barcode range can cause 500 error
This fixes the error 500 generated when using the label
generator if you use the "Bibliographic data precedes
barcode" layout type when printing a barcode range.

Test plan:
1. Set up information for testing:
   1.1 Create a new label layout:
       1.1.1 Cataloging > Tools > Label creator
       1.1.2 New > Label layout
       1.1.3 Add these details:
             - Layout name: BZ34157
             - Choose layout type: Bibliographic data precedes barcode
             - Select 'List fieds'
             - Data fields: add some text at the end
                title, author, isbn, issn, itemtype, barcode,
                itemcallnumber, 'Some text'
       1.1.3 Save
   1.2 Ranges of barcode numbers for testing:
       1.2.1 Where the numbers are not used in KTD, and are LOWER than
             the highest barcode number (39999000019193):
             500000 to 500100
       1.2.3 Where the numbers are not used in KTD, and are HIGHER than
             the highest barcode number (39999000019193):
             39999000020000 to 39999000020100
       1.2.2 Where the numbers are used in KTD:
             3999900000001 to 3999900001001
2. Print a barcode range using the ranges in 1.2:
   2.1 Cataloging > Tools > Label creator > Print barcode range
   2.2 Enter the barcode ranges
   2.3 Select a layout to be applied: BZ34157
   2.4 Export
   2.5 Click "Download as PDF"
   2.6 Results for all barcode ranges:
       ==> You get a page with "An error has occured! Error 500...".
3. Repeat step 2, but select the DEFAULT layout for 2.3:
   ==> Results for all barcode ranges: PDFs with barcode labels
       successfully generated
4. Apply the patches and restart everything (restart_all)
5. Repeat steps 2 and 3.
6. Results for all barcode ranges and the BZ34157 and DEFAULT layouts:
   ==> PDFs with barcode labels successfully generated

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: David Nind <david@davidnind.com>

Bug 34157: (Follow up) Removed the debugging data

Signed-off-by: David Nind <david@davidnind.com>

Bug 34157: (follow-up) Tidiness fix

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-15 16:32:52 -06:00
..
AuthoritiesMarc Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Barcodes Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
ClassSortRoutine Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ClassSplitRoutine Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Creators Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
External Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Form Bug 34776: Add unit tests for sub restore_form_values 2025-06-30 08:30:51 -06:00
Heading Bug 39415: (follow-up) Add 651g to bib heading fields as well 2025-05-06 18:48:18 +02:00
ILSDI Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Installer Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Labels Bug 34157: Exporting labels as a barcode range can cause 500 error 2025-07-15 16:32:52 -06:00
Linker Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Members Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
OAI Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Output Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Patroncards Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Reports Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
SIP Bug 32934: Correctly honor the no block due date for SIP checkout messages 2025-07-11 15:26:50 -06:00
Search Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Serials Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Utils/DataTables Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Accounts.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Acquisition.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Auth.pm Bug 39734: Remove obsolete call of system preference IntranetmainUserblock 2025-05-06 18:48:24 +02:00
Auth_cas_servers.yaml.sample
…
Auth_with_cas.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Auth_with_ldap.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Auth_with_shibboleth.pm Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
AuthoritiesMarc.pm Bug 40119: (QA follow-up) Small additional comment 2025-06-13 13:21:37 -06:00
Barcodes.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Biblio.pm Bug 37305: Remove C4::Biblio::prepare_host_field 2025-07-07 10:20:24 -06:00
Breeding.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Budgets.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Calendar.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Charset.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Circulation.pm Bug 32934: Correctly honor the no block due date for SIP checkout messages 2025-07-11 15:26:50 -06:00
ClassSortRoutine.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ClassSource.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ClassSplitRoutine.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Context.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Contract.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
CourseReserves.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Creators.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
HTML5Media.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Heading.pm Bug 38729: Linker should consider diacritics 2025-04-14 08:50:57 +02:00
HoldsQueue.pm Bug 20747: (follow-up) Fix hold queue to work with LocalHoldPriority Group options 2025-05-15 08:34:20 +02:00
ImportBatch.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
ImportExportFramework.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
InstallAuth.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Installer.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
ItemCirculationAlertPreference.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Items.pm Bug 23010: Handle error in C4/Items.pm using try/catch 2025-06-24 16:10:21 -06:00
Koha.pm Bug 40277: Remove warn in C4::Koha::GetAuthorisedValues() 2025-07-07 10:20:27 -06:00
Labels.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Languages.pm Bug 39325: Tidy 2025-04-28 18:51:27 +02:00
Letters.pm Bug 36020: Port default recall notices to Template Toolkit 2025-06-13 13:21:41 -06:00
Linker.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Log.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
MarcModificationTemplates.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Matcher.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Members.pm Bug 37418: delete_patrons.pl: Exclude patrons with restrictions 2025-04-25 08:46:53 +02:00
Message.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Output.pm Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Overdues.pm Bug 39405: (follow-up) Add the parameter borrowernumber to the overwrite_calc_fine plugin hook 2025-04-25 08:46:49 +02:00
Patroncards.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Record.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Reports.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Reserves.pm Bug 40055: Make MoveReserve be passed objects instead of ids 2025-06-13 13:21:43 -06:00
Ris.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
RotatingCollections.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
SMS.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Scheduler.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Scrubber.pm Bug 40079: (follow-up) Improve test coverage and fix undef handling 2025-06-30 08:30:44 -06:00
Search.pm Bug 36947: Add system preference for configurable locale-based facet sorting 2025-07-11 15:26:56 -06:00
Serials.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Service.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ShelfBrowser.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
SocialData.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Stats.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Suggestions.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
TTParser.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Tags.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Templates.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
TmplToken.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
TmplTokenType.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
UsageStats.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
XISBN.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
XSLT.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00