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

[8.x] backport some commits #3517

Merged
merged 3 commits into from
Feb 24, 2025
Merged

[8.x] backport some commits #3517

merged 3 commits into from
Feb 24, 2025

Conversation

sandbergja and others added 3 commits February 24, 2025 10:00
Fixes two cases of Rails/Delegate, which are now caught thanks to
an enhancement in rubocop-rails 2.30.0.

See https://github.com/rubocop/rubocop-rails/releases/tag/v2.30.0
…vot is configured (#3514)

each_with_object ignores the return value of the supplied block; you need to mutate
the passed object instead.

Prior to this change, the ramifications of bug are that:
* FilterField#permitted_params always includes empty hashes (the original, unmutated
  object we passed to each_with_object) for a facet pivot field.
* When Blacklight::Parameters::deep_merge_permitted_params comes across empty hashes,
  it discards a present hash in favor of the empty one.
* As the permitted params for all facet fields are merged together, the presence of
  even one facet pivot field leads us to discard all other permitted facet field keys.
* We have empty hashes, rather than hashes with permitted facet keys going into
  Blacklight::Parameters#deep_unmangle_params!
* Blacklight::Parameters#deep_unmangle_params! can find no permitted parameters that
  it needs to unmangle, so the facebook params never get unmangled, causing errors
  and unexpected behavior elsewhere in the stack.
* Facebook-style query params don't work if a facet pivot is configured.

Co-authored-by: Christina Chortaria <christinach@users.noreply.github.com>
@sandbergja sandbergja marked this pull request as ready for review February 24, 2025 18:07
@seanaery seanaery merged commit f3ec30f into release-8.x Feb 24, 2025
13 checks passed
@seanaery seanaery deleted the backports-8.x branch February 24, 2025 18:56
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.

2 participants