Bug 21052

Summary: New patron card printer profile won't save if paper bin is empty
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Label/patron card printingAssignee: Chris Nighswonger <cnighswonger>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22429
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Katrin Fischer 2018-07-09 08:57:04 UTC
When adding a new printer profile in the patron card creator tool, you can save without entering a paper bin, but it will not create a new entry in the database. There is no error, the field is not marked as required.

To test:
- Add a new printer profile
- Fill in description, leave other fields unchanged
- Save
- Verify that the new printer profile doesn't appear in the list and hasn't been created
Comment 1 Jonathan Druart 2018-07-11 22:04:32 UTC
Same for other labels/* forms

In the logs:

Database returned the following error on attempted INSERT: Duplicate entry 'DEFAULT PRINTER-0-Tray 1-Labels' for key 'printername' at /home/vagrant/kohaclone/C4/Creators/Profile.pm line 164.

 or

profile_id is currently undefined. at /home/vagrant/kohaclone/C4/Creators/Profile.pm line 184.
Comment 2 Katrin Fischer 2018-07-12 05:24:17 UTC
We've also managed to create a template that takes up 100% CPU and brings down Koha when trying to print a PDF. But so far have not been able to figure out how to reproduce it on another system. There are some serious issues with the forms not checking for good input.
Comment 3 Katrin Fischer 2019-03-06 13:44:03 UTC
*** Bug 22460 has been marked as a duplicate of this bug. ***
Comment 4 Katrin Fischer 2019-03-06 13:45:01 UTC
(In reply to Katrin Fischer from comment #2)
> We've also managed to create a template that takes up 100% CPU and brings
> down Koha when trying to print a PDF. But so far have not been able to
> figure out how to reproduce it on another system. There are some serious
> issues with the forms not checking for good input.

We filed bug 22462 for this.