Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent sorting of OAI records #17

Open
adunn49 opened this issue Jan 10, 2023 · 1 comment
Open

Inconsistent sorting of OAI records #17

adunn49 opened this issue Jan 10, 2023 · 1 comment

Comments

@adunn49
Copy link

adunn49 commented Jan 10, 2023

It has been reported by our client that the ordering of records is inconsistent within the OAI response. Whilst the first page appears to return items in a random order, subsequent pages of a paginated list are sorted. My knowledge of this module and usage is currently next to nothing but I wonder whether this is caused by this code https://github.com/silverstripe-terraformers/open-archive-initiative-repository/blob/main/src/Controllers/OaiController.php#L423-L431

Presumably the first page wouldn't have any applied filters, so an unsorted list is returned, otherwise sorting is applied.

@chrispenny
Copy link
Member

Thanks, @adunn49 - good spotting.

Yup, ->sort('LastEdited ASC') needs to be added to line 424 where we return the PaginatedList.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants