Bug 36931 - label-item-search.pl paging doesn't work (due to CSRF changes)
Summary: label-item-search.pl paging doesn't work (due to CSRF changes)
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: David Cook
QA Contact: Marcel de Rooy
URL:
Keywords: RM_priority
Depends on:
Blocks: 30745 36192
  Show dependency treegraph
 
Reported: 2024-05-23 06:22 UTC by David Cook
Modified: 2024-05-30 08:17 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 36931: Fix label-item-search.pl by removing CSRF requirement (2.21 KB, patch)
2024-05-23 06:45 UTC, David Cook
Details | Diff | Splinter Review
Bug 36931: Fix label-item-search.pl by removing CSRF requirement (2.26 KB, patch)
2024-05-23 08:26 UTC, David Nind
Details | Diff | Splinter Review
Bug 36931: Fix label-item-search.pl by removing CSRF requirement (2.36 KB, patch)
2024-05-24 09:37 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2024-05-23 06:22:24 UTC
The label-item-search.pl initially does a cud-do_search POST, but then it does do_search GETs when paging.

This should just be a "do_search GET" in all cases.
Comment 1 David Cook 2024-05-23 06:45:31 UTC
Created attachment 167063 [details] [review]
Bug 36931: Fix label-item-search.pl by removing CSRF requirement

This change converts a stateless POST into a GET, so that the paging
of the label-item-search.pl results works again.

Test plan:
0. Apply the patch and restart Koha
1. Go to http://localhost:8081/cgi-bin/koha/labels/label-edit-batch.pl?op=new
2. Click "Add item(s)"
3. Add '05/01/2000' in "Added on or after date:" and click "Search"
4. Page through the results
5. Rejoice
Comment 2 David Nind 2024-05-23 08:26:36 UTC
Created attachment 167077 [details] [review]
Bug 36931: Fix label-item-search.pl by removing CSRF requirement

This change converts a stateless POST into a GET, so that the paging
of the label-item-search.pl results works again.

Test plan:
0. Apply the patch and restart Koha
1. Go to http://localhost:8081/cgi-bin/koha/labels/label-edit-batch.pl?op=new
2. Click "Add item(s)"
3. Add '05/01/2000' in "Added on or after date:" and click "Search"
4. Page through the results
5. Rejoice

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2024-05-24 09:37:51 UTC
Created attachment 167158 [details] [review]
Bug 36931: Fix label-item-search.pl by removing CSRF requirement

This change converts a stateless POST into a GET, so that the paging
of the label-item-search.pl results works again.

Test plan:
0. Apply the patch and restart Koha
1. Go to http://localhost:8081/cgi-bin/koha/labels/label-edit-batch.pl?op=new
2. Click "Add item(s)"
3. Add '05/01/2000' in "Added on or after date:" and click "Search"
4. Page through the results
5. Rejoice

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Katrin Fischer 2024-05-24 13:40:29 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 5 Fridolin Somers 2024-05-30 08:17:24 UTC
Not for 23.11.x