[Bug 37429] New: Can't edit biblio records anymore (empty form) in 24.05
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Bug ID: 37429 Summary: Can't edit biblio records anymore (empty form) in 24.05 Change sponsored?: --- Product: Koha Version: 24.05 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: koha@zefanjas.de QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl While cataloging new books the edit / add biblio form is sometimes empty. This happens also when I want to edit an existing biblio or import one via Z.39.50. Sometime I can add 5-10 new items before it happens, sometimes it happens after every new record. The only "fix" right now for me is to do a `service koha-common restart`. The log files don't show any error. To reproduce the issue: 1. Open an existing biblio (detail.pl) 2. Click "Edit record" 3. Change the framework (no need to change any details) 4. Change the framework back to the original one (no need to save anything) 5. Go back to the biblio overview page (detail.pl) 6. Click "Edit record" again → mask / form is empty -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 zefanjas <koha@zefanjas.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliothek@th-wildau.de --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- This behavior is caused by $changed_framework with a value = 1 even when calling addbiblio.pl without an param op: our($tagslib,$authorised_values_sth,$is_a_modif,$usedTagsLib,$mandatory_z3950,$op,$changed_framework); -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 --- Comment #2 from Andreas Roussos <a.roussos@dataly.gr> --- git bisect points to commit 3f2a8ecf3c9f3421260657bfc779029e6ae75f2c Bug 34478: Regression - fix change framework https://git.koha-community.org/Koha-community/Koha/commit/3f2a8ecf3c9f342126... -- 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=37429 --- Comment #3 from Andreas Roussos <a.roussos@dataly.gr> --- Interestingly, I cannot reproduce this if I disable and then stop Plack (followed by a restart of memcached and apache2). The following quick and dirty patch seems to fix things (even when Plack and memcached are enabled): diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 99c20580b5..754aaf175a 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -518,6 +518,7 @@ my $fa_duedatespec = $input->param('duedatespec'); my $userflags = 'edit_catalogue'; +$changed_framework = 0; if ( $op eq 'cud-change-framework' ) { $op = $input->param('original_op'); $changed_framework = 1; Not sure about the quality of the above solution, though? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36192 CC| |david@davidnind.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36192 [Bug 36192] [OMNIBUS] CSRF Protection for Koha -- 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=37429 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov --- Comment #4 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- (In reply to Andreas Roussos from comment #3)
Interestingly, I cannot reproduce this if I disable and then stop Plack (followed by a restart of memcached and apache2).
The following quick and dirty patch seems to fix things (even when Plack and memcached are enabled):
diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 99c20580b5..754aaf175a 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -518,6 +518,7 @@ my $fa_duedatespec = $input->param('duedatespec');
my $userflags = 'edit_catalogue';
+$changed_framework = 0; if ( $op eq 'cud-change-framework' ) { $op = $input->param('original_op'); $changed_framework = 1;
Not sure about the quality of the above solution, though?
The bigger issue is that $changed_framework (as well as others) shouldn't really be global variables in the first place. I don't quite understand Perl's scoping rules well enough to be able to say how big of a refactor it would be to fix that, though. In the meantime, I'd say your patch is worth doing to fix the major bug. We already do that with $is_a_modif, and it's a simple change. I'll file a follow-up bug to address the underlying issue. -- 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=37429 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37499 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37499 [Bug 37499] Remove global variables from addbiblio.pl -- 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=37429 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Can't edit biblio records |Can't edit bibliographic |anymore (empty form) in |records anymore (empty |24.05 |form) in 24.05 Keywords| |RM_priority -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=37429 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 170346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170346&action=edit Bug 37429: Set default value for global variables The global variables needs to be assigned with a default value, or the value from the previous request will be used. Global variables are persistent from one request to another, in memory. This patch: * groups default value for global variables together * removes $authorised_values_sth from this list (it is not a global var) * set $changed_framework to 0 (which fix the issue) Test plan: 1. Open an existing biblio (detail.pl) 2. Click "Edit record" 3. Change the framework (no need to change any details) 4. Change the framework back to the original one (no need to save anything) 5. Go back to the biblio overview page (detail.pl) => The form is populated -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com Version|24.05 |unspecified Summary|Can't edit bibliographic |Can't edit bibliographic |records anymore (empty |records anymore (empty |form) in 24.05 |form) -- 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=37429 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Paul Derscheid <paul.derscheid@lmscloud.de> 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=37429 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170346|0 |1 is obsolete| | --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 170356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170356&action=edit Bug 37429: Set default value for global variables The global variables needs to be assigned with a default value, or the value from the previous request will be used. Global variables are persistent from one request to another, in memory. This patch: * groups default value for global variables together * removes $authorised_values_sth from this list (it is not a global var) * set $changed_framework to 0 (which fix the issue) Test plan: 1. Open an existing biblio (detail.pl) 2. Click "Edit record" 3. Change the framework (no need to change any details) 4. Change the framework back to the original one (no need to save anything) 5. Go back to the biblio overview page (detail.pl) => The form is populated Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA 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=37429 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170356|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 170424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170424&action=edit Bug 37429: Set default value for global variables The global variables needs to be assigned with a default value, or the value from the previous request will be used. Global variables are persistent from one request to another, in memory. This patch: * groups default value for global variables together * removes $authorised_values_sth from this list (it is not a global var) * set $changed_framework to 0 (which fix the issue) Test plan: 1. Open an existing biblio (detail.pl) 2. Click "Edit record" 3. Change the framework (no need to change any details) 4. Change the framework back to the original one (no need to save anything) 5. Go back to the biblio overview page (detail.pl) => The form is populated Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.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=37429 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|24.11.00 |24.11.00,24.05.04 released in| | CC| |lucas@bywatersolutions.com --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37947 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37947 [Bug 37947] Import from Z39.50 doesn't open the record in editor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Looks like this is mainly for $op. Since in 23.11.x $op is not global, is this needed. If yes please provide rebased patches. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37429 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #12 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org