[Bug 16750] New: Redirect from selectbranchprinter.pl to additem.pl causes software error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Bug ID: 16750 Summary: Redirect from selectbranchprinter.pl to additem.pl causes software error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org How to reproduce: 1) Edit and save an item in the items editor 2) You should be redirected back to the items editor, note that the biblionumber is passed in the url 3) Choose "set library" from the upper right hand pulldown on the page 4) Choose a different library, click submit 5) You should get the error message: Software error: Can't call method "fields" on an undefined value at /home/vagrant/kohaclone/cataloguing/additem.pl line 736. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=16750 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 52456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52456&action=edit Bug 16750 - Redirect from selectbranchprinter.pl to additem.pl causes software error How to reproduce: 1) Edit and save an item in the items editor 2) You should be redirected back to the items editor, note that the biblionumber is passed in the url 3) Choose "set library" from the upper right hand pulldown on the page 4) Choose a different library, click submit 5) You should get the error message: Software error: Can't call method "fields" on an undefined value at /home/vagrant/kohaclone/cataloguing/additem.pl line 736. Test Plan: 1) Apply this patch 2) Follow plan above 3) No software error should occur at step 5 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch 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=16750 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52456|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 52462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52462&action=edit Bug 16750 - Redirect from selectbranchprinter.pl to additem.pl causes software error How to reproduce: 1) Edit and save an item in the items editor 2) You should be redirected back to the items editor, note that the biblionumber is passed in the url 3) Choose "set library" from the upper right hand pulldown on the page 4) Choose a different library, click submit 5) You should get the error message: Software error: Can't call method "fields" on an undefined value at /home/vagrant/kohaclone/cataloguing/additem.pl line 736. Test Plan: 1) Apply this patch 2) Follow plan above 3) No software error should occur at step 5 Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Kyle M Hall from comment #0)
2) You should be redirected back to the items editor, note that the biblionumber is passed in the url
"is *not* passed" I guess? I don't get this error (using plack?) I don't like the idea to pass GET parameter to a POST form, it sounds weird. I suppose this error is going to happen for all POST forms, should not we try to provide a global fix? Looking at circ/selectbranchprinter.pl it seems that oldreferer must be set to avoid such a failure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 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=16750 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #3)
(In reply to Kyle M Hall from comment #0)
2) You should be redirected back to the items editor, note that the biblionumber is passed in the url
"is *not* passed" I guess? I don't get this error (using plack?) I don't like the idea to pass GET parameter to a POST form, it sounds weird. I suppose this error is going to happen for all POST forms, should not we try to provide a global fix? Looking at circ/selectbranchprinter.pl it seems that oldreferer must be set to avoid such a failure.
I think a global fix would be much better, but I'm not sure how that could be accomplished if it all aside from switching all possible post forms to get. That seems like a less than ideal solutions. If you have any ideas I'd love to hear them! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52932 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52932&action=edit [ALT] Bug 16750: Correctly redirect after setting library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Kyle, could you have a look at this patch? It seems to work as you want. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |srdjan@catalyst.net.nz --- Comment #7 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Jonathan, maybe a silly question: wouldn't it be better to get referer from the header in selectbranchprinter.pl? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Srdjan Jankovic from comment #7)
Jonathan, maybe a silly question: wouldn't it be better to get referer from the header in selectbranchprinter.pl?
It's what does the current code, but the HTTP_REFERER does not contain the POST params. But actually I am not sure it's a good idea: with this patch the form will be submitted again and the item will be saved a second time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 --- Comment #9 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Ah I see. I usually go for storing that in the session, but this is fine too. I'll let Kyle have a look, and then sign off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #8)
(In reply to Srdjan Jankovic from comment #7)
Jonathan, maybe a silly question: wouldn't it be better to get referer from the header in selectbranchprinter.pl?
It's what does the current code, but the HTTP_REFERER does not contain the POST params. But actually I am not sure it's a good idea: with this patch the form will be submitted again and the item will be saved a second time.
I think the creation of the extra item is blocker for your alternative patch. If you can find a way to avoid that I'd be happy to sign yours. Otherwise my patch, though a more specific case, is safer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The problem with your patch is that it will only fix 1 page whereas we have plenty of others with the same issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #11)
The problem with your patch is that it will only fix 1 page whereas we have plenty of others with the same issue.
I totally agree. I much prefer your patch except for the risk of accidentally adding data to the database. I'm sure this behavior exists not only for additem.pl, but for any cgi driven data creation that does not involve a redirect. Do you have any thoughts on how to avoid that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |cbrannon@cdalibrary.org --- Comment #13 from Christopher Brannon <cbrannon@cdalibrary.org> --- This looks like it is in discussion and not ready for sign off. Please correct the status change if I am incorrect. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17157 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 riotaylor <tolaricha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tolaricha@gmail.com --- Comment #14 from riotaylor <tolaricha@gmail.com> --- I installed Agfa drystar software on my pc. The version is 1.95 but the printer shows the offline status. The installation of the software is successful but still, the issue comes again and again. than i visit https://www.canonprintersupportnumbers.com/blog/how-to-fix-canon-printer-off... for the solution. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52462|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90462&action=edit Bug 16750 - Redirect from selectbranchprinter.pl to additem.pl causes software error How to reproduce: 1) Edit and save an item in the items editor 2) You should be redirected back to the items editor, note that the biblionumber is not passed in the url 3) Choose "set library" from the upper right hand pulldown on the page 4) Choose a different library, click submit 5) You should get the error message: Software error: Can't call method "fields" on an undefined value at /home/vagrant/kohaclone/cataloguing/additem.pl line 736. Test Plan: 1) Apply this patch 2) Follow plan above 3) No software error should occur at step 5 Signed-off-by: Marc Véron <veron@veron.ch> 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=16750 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off CC| |nick@bywatersolutions.com --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Three years later, still a valid bug. In testing Kyle's patch solves the issue - Jonathan's leads to 404 I think we should open new bug for the more general fix and deal with those issues there and fix up at least this known error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=16750 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52932|0 |1 is obsolete| | Attachment #90462|0 |1 is obsolete| | --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 90553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90553&action=edit Bug 16750: Redirect from selectbranchprinter.pl to additem.pl causes software error How to reproduce: 1) Edit and save an item in the items editor 2) You should be redirected back to the items editor, note that the biblionumber is passed in the url 3) Choose "set library" from the upper right hand pulldown on the page 4) Choose a different library, click submit 5) You should get the error message: Software error: Can't call method "fields" on an undefined value at /home/vagrant/kohaclone/cataloguing/additem.pl line 736. Test Plan: 1) Apply this patch 2) Follow plan above 3) No software error should occur at step 5 Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've often run into this bug by accidentally refreshing the page (very annoying if it happens during a presentation). The fix is small but will be very helpful to avoid this issue. I'd love a global fix, but I think this is worth having for the refresh issue alone. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version(s)| |19.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=16750 --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #18)
I've often run into this bug by accidentally refreshing the page (very annoying if it happens during a presentation). The fix is small but will be very helpful to avoid this issue. I'd love a global fix, but I think this is worth having for the refresh issue alone.
I have opened bug 23117 for the global fix (if it is what you meant). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23117 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolin.somers@biblibre.co | |m Version(s)|19.11.00 |19.11.00,19.05.01 released in| | --- Comment #21 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16750 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #22 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 18.11.x for 18.11.07 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org