[Bug 24350] New: Can't place holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Bug ID: 24350 Summary: Can't place holds Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Depends on: 22284 When trying to place a hold in staff on master, I have the following error: Template process failed: undef error - Not a HASH reference at /home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96. at /home/vagrant/kohaclone/C4/Templates.pm line 122 It works pre cd4dfc6e121a8f867fee5fcf8ccfd594bf163ba7 I haven't done a git bisect, but as this is the most recent holds work, I am going to add a link suspecting it to be the cause. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284 [Bug 22284] Groups of pickup locations for holds -- 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=24350 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- It makes sense to blame that dev as it reengineers the pickup locations code. I will take a look. -- 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=24350 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96860 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96860&action=edit Bug 24350: Fix Branches.pickup_locations This will fix the following error: Template process failed: undef error - Not a HASH reference at /home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96. at /home/vagrant/kohaclone/C4/Templates.pm line 122 Koha::Libraries->pickup_locations does not always return an array, but arrayref if $biblio is not a Koha::Biblio object. I do not think it's the correct fix, the pattern in Koha::Libraries->pickup_locations is wrong: we should not expect 2 different types for a given parameter, biblio should always be a Koha::Biblio (idem for item btw). That could be fixed easily if the template had the Koha::Biblio object sent. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|tomascohen@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #2)
Created attachment 96860 [details] [review] Bug 24350: Fix Branches.pickup_locations
This will fix the following error: Template process failed: undef error - Not a HASH reference at /home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96. at /home/vagrant/kohaclone/C4/Templates.pm line 122
Koha::Libraries->pickup_locations does not always return an array, but arrayref if $biblio is not a Koha::Biblio object.
I do not think it's the correct fix, the pattern in Koha::Libraries->pickup_locations is wrong: we should not expect 2 different types for a given parameter, biblio should always be a Koha::Biblio (idem for item btw). That could be fixed easily if the template had the Koha::Biblio object sent.
I think we should fix this blocker with your patch, Jonathan, and file a separate bug for refactoring things. This way people can keep testing the feature and writing the manual pages, while we implement things in a different way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 24362 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=24350 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96860|0 |1 is obsolete| | --- Comment #5 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 96912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96912&action=edit Bug 24350: Fix Branches.pickup_locations This will fix the following error: Template process failed: undef error - Not a HASH reference at /home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96. at /home/vagrant/kohaclone/C4/Templates.pm line 122 Koha::Libraries->pickup_locations does not always return an array, but arrayref if $biblio is not a Koha::Biblio object. I do not think it's the correct fix, the pattern in Koha::Libraries->pickup_locations is wrong: we should not expect 2 different types for a given parameter, biblio should always be a Koha::Biblio (idem for item btw). That could be fixed easily if the template had the Koha::Biblio object sent. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Agreed that longer term we should do the refactoring fix.. but this is a pragmatic solution to get things working again so I'm happy to take it as is.. I'll add a dependant bug for the refactor now so we don't forget it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96912|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 96913 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96913&action=edit Bug 24350: Fix Branches.pickup_locations This will fix the following error: Template process failed: undef error - Not a HASH reference at /home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96. at /home/vagrant/kohaclone/C4/Templates.pm line 122 Koha::Libraries->pickup_locations does not always return an array, but arrayref if $biblio is not a Koha::Biblio object. I do not think it's the correct fix, the pattern in Koha::Libraries->pickup_locations is wrong: we should not expect 2 different types for a given parameter, biblio should always be a Koha::Biblio (idem for item btw). That could be fixed easily if the template had the Koha::Biblio object sent. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24368 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24368 [Bug 24368] Koha::Libraries->pickup_locations needs refactoring/ratifying -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I'm getting a slightly different error when trying to place a hold now: Template process failed: undef error - Can't call method "unblessed" on unblessed reference at /kohadevbox/koha/Koha/Template/Plugin/Branches.pm line 93. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 97231 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97231&action=edit Bug 24350: follow-up - unbless each library, not the array -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Followup pushed, though I'm slightly sceptical.. it'll be interesting to see if anything falls out in the Jenkins run. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- Still getting this error when placing a hold: Template process failed: undef error - Not an ARRAY reference at /home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 95. at /home/vagrant/kohaclone/C4/Templates.pm line 122 A new bug, or this one is still broken? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Still this one.. Agustin is working of fixes I believe... Jonathan and Nick just flip flopped the issue with their patches unfortunately.. it needs fixing further up the stack. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- On Friday I worked on refactoring the template methods to work in a different way. I think we should 'do it right' and think a bit about this. Agustín is back from vacation and will step in -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #15 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 97258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97258&action=edit Bug 24350: (follow-up) Clear Koha::Libraries->pickup_locations() and move logic to Koha::Template::Plugin::Branches->pickup_locations(). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97258|0 |1 is obsolete| | --- Comment #16 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 97259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97259&action=edit Bug 24350: (follow-up) Clear Koha::Libraries->pickup_locations() and move logic to Koha::Template::Plugin::Branches->pickup_locations(). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97259|0 |1 is obsolete| | --- Comment #17 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 97260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97260&action=edit Bug 24350: (follow-up) Clear Koha::Libraries->pickup_locations() and move logic to Koha::Template::Plugin::Branches->pickup_locations(). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #18 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 97261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97261&action=edit Bug 24350: (follow-up) Fix pickup_location test in t/db_dependent/Template/Plugin/Branches.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Followups pushed, thanks Agustin :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Tests are failing: t/db_dependent/Koha/Libraries.t .. 4/9 # Looks like you planned 11 tests but ran 2. # Failed test 'Given BranchTransferLimitsType = itemtype and item-level_itypes = ON' # at t/db_dependent/Koha/Libraries.t line 258. # Looks like you planned 4 tests but ran 2. # Looks like you failed 1 test of 2 run. # Failed test 'UseBranchTransferLimits = ON' # at t/db_dependent/Koha/Libraries.t line 422. # Looks like you failed 1 test of 2. # Failed test 'pickup_locations' # at t/db_dependent/Koha/Libraries.t line 423. Can't call method "branchcode" on unblessed reference at t/db_dependent/Koha/Libraries.t line 195. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Bug 24350 depends on bug 22284, which changed state. Bug 22284 Summary: Groups of pickup locations for holds https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |joy@bywatersolutions.com Status|Pushed to master |RESOLVED --- Comment #21 from Joy Nelson <joy@bywatersolutions.com> --- Not backported to 19.11.x due to dependencies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 97352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97352&action=edit Bug 24350: ->pickup_locations returns unblessed objects Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Followup pushed, thanks Tomas. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24350 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org