Koha version: 3.20.01.000 OS version ('uname -a'): Linux Library 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux =================================================================== I am getting error message when trying to create patron card. I followed the method as follows: Patron Card Creator Home New Batch -->Add Items -->Add Error Comes as follows: Software error: Can't locate object method "get_attr" via package "-2" (perhaps you forgot to load "-2"?) at /usr/share/koha/intranet/cgi-bin/patroncards/edit-batch.pl line 125. For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.
I'd you have not defined a batch, could you confirm? select count(*) from creator_batches where creator="Patroncards"? Why did you open this issue in the Koha security project?
say*
Can't reproduce. Can create new batches without 'this' problem What I found is that if you press new batch you get a window saying that there are no items (patrons) for batch '0' Pressing add items, a new window pops to search and add new patrons. If you press a couple of 'Add' from search results you end with many 'new' batches with '1' patron each
This is not a security bug. :)
How to make a solutions for this error? Can't locate object method "get_attr" via package "-2" (perhaps you forgot to load "-2"?) at /usr/share/koha/intranet/cgi-bin/patroncards/edit-batch.pl line 125.
You have to create a new batch and then add items.
This has been changed a little bit, but problem remain there. To reproduce the issue: 1)Log in as database administrator account. 2)Goto Tools > Patron card creator > Batches > New > Card batch 3)Get notice the label "Current library: NO_LIBRARY_SET" 4)Add a borrowernumber like 51 and click in button Add patron(s) 5)The error is launched. 6)Log out the user and login with another admin account with the librarian permissions. 7)Repeat the steps 1 to 6.
Created attachment 47146 [details] [review] Bug 14489: Patron card creator fail when login with database administrator account To reproduce the issue: 1)Log in as database administrator account. 2)Goto Tools > Patron card creator > Batches > New > Card batch 3)Get notice the label "Current library: NO_LIBRARY_SET" 4)Add a borrowernumber like 51 and click in button Add patron(s) 5)The error is launched. 6)Log out the user and login with another admin account with the librarian permissions. 7)Repeat the steps 1 to 6. To test: -Apply patch -Follow steps 1 to 6 -Notice about the new informational message "Set library" -Also see the warning message displayed when add patron 51. Koha should not fail
I don't really it is a problem that the database administrator account can't create batches. You shouldn't be using that account to do work. Liz
You're right Liz(In reply to Liz Rea from comment #9) > I don't really it is a problem that the database administrator account can't > create batches. You shouldn't be using that account to do work. > > Liz You're right Liz. The software doesn't crash in a normal way. What do you think about this, Jonathan? If you prefer guys close the bug. No biggie if you feel this patch doesn't apply.
If the error only occurs when you are logged in with the admin user, this bug is invalid.