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

[5.x] Prevent additional augmented search result data from being lost #10301

Conversation

JohnathonKoster
Copy link
Contributor

@JohnathonKoster JohnathonKoster commented Jun 14, 2024

This PR fixes #10251 by only running the bulk augmentation process in Antlers when a collection contains BulkAugmentable instances. Additionally, the Result class's toDeferredAugmentedArray will now return the results of toAugmentedCollection to ensure the extra search data is added.

Notes for review: I had originally looked into simply adjusting the what the Result augments to, but decided against that since it could be quite the unexpected change for anyone doing stuff the results of newAugmentedInstance on Result objects. If curious, that was implemented here: 5.x...JohnathonKoster:cms:search-result-augmentation and makes it Just Work ™️ with the bulk augmentation stuff. However, with this PR, I think having it check for instanceof BulkAugmentable is a good idea for anything else that may have been missed.

@jasonvarga jasonvarga merged commit e88ddf5 into statamic:5.x Jun 17, 2024
16 checks passed
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

Successfully merging this pull request may close these issues.

{{ search_snippets }} does not return anything since v5
3 participants