[Bug 16955] New: Internal Server Error while populating new framework
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Bug ID: 16955 Summary: Internal Server Error while populating new framework Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org While populating a new framework, an internal server error occurs. It happens on an installation with Plack. Steps to reproduce: - Go to Home > Administration > MARC frameworks - Add framework e.g. TEST, submit - In List of frameworks, go to framework TEST, Actions, MARC Structure - Create framework for... : Select DEFAULT Result: Internal Server Error (rest of sceen blank) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 --- Comment #1 from Marc Véron <veron@veron.ch> --- Lines from plack-error.log: Variable "$cache" is not available at (...)/admin/marctagstructure.pl line 360. Variable "$frameworkcode" is not available at /home/marc/koha/admin/marctagstructure.pl line 362. Variable "$cache" is not available at (...)/admin/marctagstructure.pl line 360. Variable "$frameworkcode" is not available at (...)a/admin/marctagstructure.pl line 362. Can't call method "clear_from_cache" on an undefined value at /home/marc/koha/admin/marctagstructure.pl line 360. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 53612 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53612&action=edit Bug 16955: Internal Server Error while populating new framework While populating a new framework, an internal server error occurs. (Error occurs with plack enabled) Steps to reproduce: - Go to Home > Administration > MARC frameworks - Add framework e.g. TEST, submit - In List of frameworks, go to framework TEST, Actions, MARC Structure - Create framework for... : Select DEFAULT Result: Internal Server Error (rest of screen blank) This patch fixes a variable scope issue and moves 4 lines that should be inside a loop. To test: - Apply patch - Verify that code changes make sense - Try to recreate error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com Assignee|gmcharlt@gmail.com |veron@veron.ch Component|Architecture, internals, |Staff Client |and plumbing | Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16987 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- *** Bug 16987 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=16955 Josef Moravec <josef.moravec@gmail.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=16955 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53612|0 |1 is obsolete| | --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 53815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53815&action=edit Bug 16955: Internal Server Error while populating new framework While populating a new framework, an internal server error occurs. (Error occurs with plack enabled) Steps to reproduce: - Go to Home > Administration > MARC frameworks - Add framework e.g. TEST, submit - In List of frameworks, go to framework TEST, Actions, MARC Structure - Create framework for... : Select DEFAULT Result: Internal Server Error (rest of screen blank) This patch fixes a variable scope issue and moves 4 lines that should be inside a loop. To test: - Apply patch - Verify that code changes make sense - Try to recreate error Signed-off-by: Josef Moravec <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=16955 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |11842 CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Introduced by bug 11842. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11842 [Bug 11842] MARC framework editing is broken when memcache is enabled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- There was a wrong c/p here (you can blame me), the last 2 lines are using $frameworkcode instead of $newframeworkcode. Moreover the 4 clear_from_cache calls are inside the while loop, which means that we are clearing the cache 4 times per subfield (!). Finally these calls are actually not needed :) As we are creating a new framework, the cache should be empty... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #6)
Moreover the 4 clear_from_cache calls are inside the while loop, which means that we are clearing the cache 4 times per subfield (!).
Ha, it is added by this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17009 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17009 [Bug 17009] Duplicating frameworks is unnecessary slow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 --- Comment #8 from Marc Véron <veron@veron.ch> --- Hi Jonathan, Sorry, I have no time at the mmoment to fix this. Can you provide an alternative patch? Thanks Marc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=16955 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53815|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53874&action=edit Bug 16955: Do not clear from cache when adding a new framework There are several issues with these lines: 1/ $cache is not defined correctly and it not visible inside duplicate_framework 2/ $frameworkcode is a wrong c/p, it should be $newframeworkcode 3/ these calls are not needed. As we are creating a new framework, the cache should be empty... This patch will simply remove these calls Test plan: Duplicate a framework and confirm that you do not get any error in your logs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|veron@veron.ch |jonathan.druart@bugs.koha-c | |ommunity.org Severity|minor |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Christopher Brannon <cbrannon@cdalibrary.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=16955 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53874|0 |1 is obsolete| | --- Comment #10 from Christopher Brannon <cbrannon@cdalibrary.org> --- Created attachment 54086 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54086&action=edit Bug 16955: Do not clear from cache when adding a new framework There are several issues with these lines: 1/ $cache is not defined correctly and it not visible inside duplicate_framework 2/ $frameworkcode is a wrong c/p, it should be $newframeworkcode 3/ these calls are not needed. As we are creating a new framework, the cache should be empty... This patch will simply remove these calls Test plan: Duplicate a framework and confirm that you do not get any error in your logs. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Nick Clemens <nick@bywatersolutions.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=16955 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54086|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 54387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54387&action=edit Bug 16955: Do not clear from cache when adding a new framework There are several issues with these lines: 1/ $cache is not defined correctly and it not visible inside duplicate_framework 2/ $frameworkcode is a wrong c/p, it should be $newframeworkcode 3/ these calls are not needed. As we are creating a new framework, the cache should be empty... This patch will simply remove these calls Test plan: Duplicate a framework and confirm that you do not get any error in your logs. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #13 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.03. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16955 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.10 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org