If you perform a list sets, you always get a resumption token, and it points to the same url always: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListSets Turns out we are sending the wrong params to build the token
Created attachment 123063 [details] [review] Bug 28741: Fix use of resumption token params TO test: 1 - Enable OAI-PMH server in Koha 2 - Set OAI-PMH:MaxCount to 5 3 - Define 6 sets in Admin->OAI sets configuration Can setSpec and setName to 1,2,3.... 4 - Browse to: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListSets 5 - Click 'Show more' 6 - Keep seeing the same 5 - note the page says 'Results fetched -4-0' 7 - Apply patch 8 - Restart all the things 9 - Reload the ListSets URL above 10 - Click 'Show more' 11 - See the 6th set and note no 'Show more' 12 - Set OAI-PMH:MaxCount to 1 13 - Go to the base ListSets url again 14 - Confirm you can 'Show more' until you reach the end
Caused by bug 27584
Created attachment 123066 [details] [review] Bug 28741: Fix use of resumption token params TO test: 1 - Enable OAI-PMH server in Koha 2 - Set OAI-PMH:MaxCount to 5 3 - Define 6 sets in Admin->OAI sets configuration Can setSpec and setName to 1,2,3.... 4 - Browse to: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListSets 5 - Click 'Show more' 6 - Keep seeing the same 5 - note the page says 'Results fetched -4-0' 7 - Apply patch 8 - Restart all the things 9 - Reload the ListSets URL above 10 - Click 'Show more' 11 - See the 6th set and note no 'Show more' 12 - Set OAI-PMH:MaxCount to 1 13 - Go to the base ListSets url again 14 - Confirm you can 'Show more' until you reach the end Signed-off-by: David Nind <david@davidnind.com>
Created attachment 123369 [details] [review] Bug 28741: Regression tests This patch adds regression tests for the behavior. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 123382 [details] [review] Bug 28741: Regression tests This patch adds regression tests for the behavior. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 123383 [details] [review] Bug 28741: Fix use of resumption token params TO test: 1 - Enable OAI-PMH server in Koha 2 - Set OAI-PMH:MaxCount to 5 3 - Define 6 sets in Admin->OAI sets configuration Can setSpec and setName to 1,2,3.... 4 - Browse to: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListSets 5 - Click 'Show more' 6 - Keep seeing the same 5 - note the page says 'Results fetched -4-0' 7 - Apply patch 8 - Restart all the things 9 - Reload the ListSets URL above 10 - Click 'Show more' 11 - See the 6th set and note no 'Show more' 12 - Set OAI-PMH:MaxCount to 1 13 - Go to the base ListSets url again 14 - Confirm you can 'Show more' until you reach the end Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 123384 [details] [review] Bug 28741: (follow-up) Silence warning Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.03
Depends on Bug 27584 not in 20.11.x
I am not sure the depedency applied - I backported this to our 20.11 early after some testing and it applied nicely (and works)
Sorry about breaking this and thanks for the fix.
Created attachment 124054 [details] [review] Bug 28741: [20.11.x] Fix warning and position check
(In reply to Fridolin Somers from comment #10) > Depends on Bug 27584 not in 20.11.x The dependency affects the variable name change, the other parts of the patch set are still valid - we still show 'Show more' when at end of list and have a warning about the undef metadata prefix