[Bug 17896] New: Enabling syspref 'BakerTaylorEnabled' causes software error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Bug ID: 17896 Summary: Enabling syspref 'BakerTaylorEnabled' causes software error Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: aleishaamohia@hotmail.com QA Contact: testopia@bugs.koha-community.org This error: Undefined subroutine &CGI::Compile::ROOT::home_vagrant_kohaclone_opac_opac_2dreadingrecord_2epl::image_url called at /home/vagrant/kohaclone/opac/opac-readingrecord.pl line 125. is triggered when I enable BakerTaylorEnabled and look at my reading history on the OPAC because subroutines it needs aren't imported until after they are called. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #1 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 58891 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58891&action=edit Bug 17896: Rearranging code in opac-readingrecord.pl so BakerTaylorEnabled works To test: 1) Enable BakerTaylorEnabled and attempt to view reading history in OPAC 2) Notice error 3) Apply patch and refresh page 4) Notice error is gone and page works Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Assignee|oleonard@myacpl.org |aleishaamohia@hotmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|enhancement |major Summary|Enabling syspref |BakerTaylorEnabled is not |'BakerTaylorEnabled' causes |plack safe in reading |software error |history at the OPAC --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Aleisha, I agree that there is something wrong, but the test plan is not enough. There are several things wrong: - import must be done at the beginning of the module - import must not be dependent of syspref in begin blocks What's happen is that Plack run all BEGIN blocks and it starts, and that the only time they are evaluated. That means that if you start plack and your pref BakerTaylorEnabled is disabled, the require+import will not be done. If you then enable the pref (and not restart plack of course) and access the opac-readingrec view, it will explode. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Aleisha, I agree that there is something wrong, but the test plan is not enough. There are several things wrong: - import must be done at the beginning of the module - import must not be dependent of syspref in begin blocks What's happening is that Plack runs all BEGIN blocks when it starts, and that is the only time they are evaluated. That means that if you start plack with the pref BakerTaylorEnabled disabled, the require+import will not be done. Then if you enable the pref (and not restart plack of course) and access the opac-readingrec view, it will explode. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #4 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 64271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64271&action=edit Bug 17896: [FOLLOW-UP] Make opac-readingrecord.pl use module Also fix template to use Koha.Preference instead of passing it from the pl file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18798 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18798 [Bug 18798] Use Koha.Preference in OPAC Reading Record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Needs Signoff |Patch doesn't apply --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Second patch doesn't apply. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64271|0 |1 is obsolete| | --- Comment #6 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 66251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66251&action=edit Bug 17896: [FOLLOW-UP] Make opac-readingrecord.pl use module Also fix template to use Koha.Preference instead of passing it from the pl file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #7 from Aleisha Amohia <aleisha@catalyst.net.nz> --- patches apply without conflict - ready to test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 66251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66251 Bug 17896: [FOLLOW-UP] Make opac-readingrecord.pl use module Review of attachment 66251: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17896&attachment=66251) ----------------------------------------------------------------- There is some JacketImages, AmazonCoverImages, etc. clean up that needs to be done that is beyond the scope of this bug. But deleting the JacketImages from the parameters was a partial start. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #8)
There is some JacketImages, AmazonCoverImages, etc. clean up that needs to be done that is beyond the scope of this bug. But deleting the JacketImages from the parameters was a partial start.
Same for BakerTaylorEnabled: opac-readingrecord.tt includes opac-bottom.inc which uses it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|Failed QA |RESOLVED --- Comment #10 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Can no longer reproduce this bug in master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WORKSFORME |--- Status|RESOLVED |REOPENED --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Aleisha Amohia from comment #10)
Can no longer reproduce this bug in master.
This is still valid. 1. hit opac-readingrecord.pl 2. Turn the pref BakerTaylorEnabled on 3. hit again opac-readingrecord.pl => Kaboom! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEW -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
3. hit again opac-readingrecord.pl => Kaboom!
I like your dramatic ending of the test plan :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24704 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58891|0 |1 is obsolete| | Attachment #66251|0 |1 is obsolete| | --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 99373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99373&action=edit Bug 17896: load BakerTaylor module with use We are incinsistent here, Amazon and Syndetics module are always loaeded in some places BakerTaylor is conditional everywhere, and causes issues under plack For simplicity sake I think we should just load this (small) module where it might be needed To test: 1 - Disable Baker and Taylor images 2 - Restart plack 3 - Visit opac-readingrecord, opac-detail, opac-search, opac-shelves, opac-user Log in to opac Virew your reading history Make/view a list Search the catalog Look at an individual title 4 - Enable BakerTaylorEnabled If you don't have Baker and Taylor credentials, simply fudge them with bad data and enable 5 - Repeat steps above, in the word of Joubu "Kaboom" 6 - Apply patch 7 - Repeat 1-4 8 - You shoudl be able to load all the pages after enabling the pref -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 24704 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=17896 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|BakerTaylorEnabled is not |BakerTaylorEnabled is not |plack safe in reading |plack safe in the OPAC |history at the OPAC | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23482 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23482 [Bug 23482] BakerTaylor images broken on OPAC lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99373|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 99377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99377&action=edit Bug 17896: load BakerTaylor module with use We are incinsistent here, Amazon and Syndetics module are always loaeded in some places BakerTaylor is conditional everywhere, and causes issues under plack For simplicity sake I think we should just load this (small) module where it might be needed To test: 1 - Disable Baker and Taylor images 2 - Restart plack 3 - Visit opac-readingrecord, opac-detail, opac-search, opac-shelves, opac-user Log in to opac Virew your reading history Make/view a list Search the catalog Look at an individual title 4 - Enable BakerTaylorEnabled If you don't have Baker and Taylor credentials, simply fudge them with bad data and enable 5 - Repeat steps above, in the word of Joubu "Kaboom" 6 - Apply patch 7 - Repeat 1-4 8 - You shoudl be able to load all the pages after enabling the pref Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 99378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99378&action=edit Bug 17896: Remove duplicated use statements and remove uneeded '&' Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|aleisha@catalyst.net.nz |nick@bywatersolutions.com Status|Signed Off |Passed QA --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Did not test but regression tested. Passing QA, thanks Nick. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17896 --- Comment #18 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=17896 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00 |20.05.00, 19.11.04 released in| | Status|Pushed to master |Pushed to stable CC| |joy@bywatersolutions.com --- Comment #19 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x for 19.11.04 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org