Bug 36931

Summary: label-item-search.pl paging doesn't work (due to CSRF changes)
Product: Koha Reporter: David Cook <dcook>
Component: Label/patron card printingAssignee: David Cook <dcook>
Status: Needs documenting --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, m.de.rooy
Version: MainKeywords: RM_priority
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Bug Depends on:    
Bug Blocks: 30745, 36192    
Attachments: Bug 36931: Fix label-item-search.pl by removing CSRF requirement
Bug 36931: Fix label-item-search.pl by removing CSRF requirement
Bug 36931: Fix label-item-search.pl by removing CSRF requirement

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