[Bug 38967] New: Export to CSV or Barcode file from item search results fail when "select visible rows" and many items are selected
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Bug ID: 38967 Summary: Export to CSV or Barcode file from item search results fail when "select visible rows" and many items are selected Change sponsored?: --- Product: Koha Version: 24.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: kkrueger@cuyahogalibrary.org QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl To replicate: 1. Go to item search. 2. Enter parameters that retrieve more than 500 items. 3. From the item search results page, show All entries, then "Select visible rows." 4. Select either Export selected results to CSV or Barcode file. 5. A resulting error message of either "This site can't be reached. The connection was reset" or a 400 Bad request page with a URL with all the item numbers inserted appears. -- 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=38967 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m Assignee|koha-bugs@lists.koha-commun |lisette@bywatersolutions.co |ity.org |m -- 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=38967 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #1 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 185724 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185724&action=edit Bug 38967: Make exportItems use POST To test: 1. Go to item search. 2. Enter parameters that retrieve more than 500 items. 3. From the item search results page, show All entries, then "Select visible rows." 4. Select either Export selected results to CSV or Barcode file. 5. A resulting error message of either "This site can't be reached. The connection was reset" or a 400 Bad request page with a URL with all the item numbers inserted appears. 6. APPLY PATCH Try steps 1 - 4 again, this time it should export. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Patch complexity|--- |Small patch Assignee|lisette@bywatersolutions.co |lucas@bywatersolutions.com |m | Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.05 |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Eric Garcia <cubingguy714@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=38967 Eric Garcia <cubingguy714@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185724|0 |1 is obsolete| | --- Comment #2 from Eric Garcia <cubingguy714@gmail.com> --- Created attachment 185743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185743&action=edit Bug 38967: Make exportItems use POST To test: 1. Go to item search. 2. Enter parameters that retrieve more than 500 items. 3. From the item search results page, show All entries, then "Select visible rows." 4. Select either Export selected results to CSV or Barcode file. 5. A resulting error message of either "This site can't be reached. The connection was reset" or a 400 Bad request page with a URL with all the item numbers inserted appears. 6. APPLY PATCH Try steps 1 - 4 again, this time it should export. Signed-off-by: Eric Garcia <cubingguy714@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Seems like we are missing something as: <input type="hidden" name="op" value="cud-show" /> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 185970 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185970&action=edit Bug 38967: Add hidden op param to POST form -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #3)
Seems like we are missing something as: <input type="hidden" name="op" value="cud-show" />
Do we really need it? If we want it, we should add a check in the controller otherwise it's useless. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #5)
(In reply to Marcel de Rooy from comment #3)
Seems like we are missing something as: <input type="hidden" name="op" value="cud-show" />
Do we really need it? If we want it, we should add a check in the controller otherwise it's useless.
Ah yes. If there is no op, we pass the Middleware. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=38967 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185743|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 186611 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186611&action=edit Bug 38967: Make exportItems use POST To test: 1. Go to item search. 2. Enter parameters that retrieve more than 500 items. 3. From the item search results page, show All entries, then "Select visible rows." 4. Select either Export selected results to CSV or Barcode file. 5. A resulting error message of either "This site can't be reached. The connection was reset" or a 400 Bad request page with a URL with all the item numbers inserted appears. 6. APPLY PATCH Try steps 1 - 4 again, this time it should export. Signed-off-by: Eric Garcia <cubingguy714@gmail.com> 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=38967 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185970|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #9 from Kristi Krueger <kkrueger@cuyahogalibrary.org> --- Great news! Any chance for a backport for this bug fix? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- This broke some tests. ``` $ prove xt/find-missing-op-in-forms.t xt/find-missing-op-in-forms.t .. 2/3 # Failed test 'The <form> in the following files are missing it's corresponding op parameter, or op does not start with 'cud-' (see bug 34478)' # at xt/find-missing-op-in-forms.t line 39. # got: '1' # expected: '0' # $VAR1 = 'koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:447'; # Looks like you failed 1 test of 3. ``` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #11 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 186629 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186629&action=edit Bug 38967: (follow-up) Force 'op' parameter This fixes a failing test: To test: 1. Run: $ ktd --shell k$ prove xt/find-missing-op-in-forms.t xt/find-missing-op-in-forms.t .. 2/3 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_25_05_candidate |additional_work_needed --- Comment #12 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- I'm not sure if the proposed solution is correct or if we prefer to add an exception in the tests. Adding Jonathan in case there's a strong opinion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- I have to admit I don't remember. I think it's good to not enforce POST for this export. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #13)
I have to admit I don't remember.
I think it's good to not enforce POST for this export.
Wasnt this about a too long URL? Shouldnt we just add an exception to the failing unit test here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #15 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #14)
(In reply to Jonathan Druart from comment #13)
I have to admit I don't remember.
I think it's good to not enforce POST for this export.
Wasnt this about a too long URL?
Yes.
Shouldnt we just add an exception to the failing unit test here?
No, we have other place where we have "dump cud-" for this same reason. I meant that we can keep the op=cud- in the template without enforcing it in the controller (ie. allow the export for GET requests as well). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #16 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #15)
Shouldnt we just add an exception to the failing unit test here?
No, we have other place where we have "dump cud-" for this same reason.
I meant that we can keep the op=cud- in the template without enforcing it in the controller (ie. allow the export for GET requests as well).
That's what my follow-up does. But shouldn't it be better to explicitly add an exception in the tests? That's why I didn't push the follow-up on behalf of Lucas. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #16)
(In reply to Jonathan Druart from comment #15)
Shouldnt we just add an exception to the failing unit test here?
No, we have other place where we have "dump cud-" for this same reason.
I meant that we can keep the op=cud- in the template without enforcing it in the controller (ie. allow the export for GET requests as well).
That's what my follow-up does. But shouldn't it be better to explicitly add an exception in the tests? That's why I didn't push the follow-up on behalf of Lucas.
And it is does the same as the follow-up of Lukas which we obsoleted.. If we add a test exception, we can remove the op parameter which is not checked in the controller. But left or right does not matter much here imo -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #18 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #17)
(In reply to Tomás Cohen Arazi (tcohen) from comment #16)
(In reply to Jonathan Druart from comment #15)
Shouldnt we just add an exception to the failing unit test here?
No, we have other place where we have "dump cud-" for this same reason.
I meant that we can keep the op=cud- in the template without enforcing it in the controller (ie. allow the export for GET requests as well).
That's what my follow-up does. But shouldn't it be better to explicitly add an exception in the tests? That's why I didn't push the follow-up on behalf of Lucas.
And it is does the same as the follow-up of Lukas which we obsoleted.. If we add a test exception, we can remove the op parameter which is not checked in the controller. But left or right does not matter much here imo
I didn't notice the obsoleted patch. It makes sense. +1 for adding an exception. it is clearer -for the time being- than a weird "op" param to workaround our own checks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186629|0 |1 is obsolete| | --- Comment #19 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 186688 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186688&action=edit Bug 38967: Add an exception for itemsearch.tt Signed-off-by: Tomás 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=38967 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186688|0 |1 is obsolete| | --- Comment #20 from Jonathan Druart <jonathan.druart@gmail.com> --- Comment on attachment 186688 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186688 Bug 38967: Add an exception for itemsearch.tt You can have more than on form in a file! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #21 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #20)
Comment on attachment 186688 [details] [review] Bug 38967: Add an exception for itemsearch.tt
You can have more than on form in a file!
You can have more than one form in a template file, I really don't think this is the solution. We already have several occurrences of dumb "cud-", I think we should continue to stick to this pattern. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #22 from Jonathan Druart <jonathan.druart@gmail.com> --- eg. koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc 86 <form action="/cgi-bin/koha/tools/batchMod.pl" method="post"> 87 [% INCLUDE 'csrf-token.inc' %] 88 <input type="hidden" name="op" value="cud-show" /> 89 <input type="hidden" name="del" value="1" /> 90 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> 91 <input type="hidden" name="src" value="CATALOGUING" /> 92 <button id="batchdelete" type="submit" class="dropdown-item">Delete items in a batch</button> 93 </form> tools/batchMod.pl 223 if ( $op eq "cud-show" || $op eq "show" ) { -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186629|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #23 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #21)
(In reply to Jonathan Druart from comment #20)
Comment on attachment 186688 [details] [review] [review] Bug 38967: Add an exception for itemsearch.tt
You can have more than on form in a file!
You can have more than one form in a template file, I really don't think this is the solution.
We already have several occurrences of dumb "cud-", I think we should continue to stick to this pattern.
Yes, I kept thinking about it. In this particular case it is even worse as the form is actually generated through JS. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #24 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- follow-up pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 --- Comment #25 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |fridolin.somers@biblibre.co | |m Version(s)|25.11.00,25.05.04 |25.11.00,25.05.04,24.11.10 released in| | --- Comment #26 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38967 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #27 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org