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

ISSUE-449: Fix multiple Contextual filters, some "NULL" and allow Exposed filters. But avoid if already set same "key" via a Cont… #450

Merged
merged 2 commits into from
May 22, 2024

Conversation

DiegoPino
Copy link
Member

…extual one

Also, for contextual ones, use the "exception" value instead of NULL So we can avoid passing "NULL" and end being not validated because of that. $executable->exposed_data = $filters; was the trick ..

See #449

@alliomeria this should do the trick with OAI and a single View dealing with both listing and getting a single record. Will report tomorrow with a live implementation and simple instructions for this (so you can also have this in your local for future needs/users)

…extual one

Also, for contextual ones, use the "exception" value instead of NULL
So we can avoid passing "NULL" and end being not validated because of that.
$executable->exposed_data = $filters; was the trick ..
@DiegoPino DiegoPino self-assigned this May 21, 2024
@DiegoPino DiegoPino added bug Something isn't working metadata Meta(l) data Drupal Views Ask and you should receive Search API Drupal 10 Upgrade economy OpenAPI a small crack in the matrix labels May 21, 2024
@DiegoPino
Copy link
Member Author

This works. Note. The Open API will not run any Views at all if none of the passed arguments is mapped to a Views argument or Filter. That is by design to avoid someone by mistake exposing their whole repository without a single filter (or though) via an API @alliomeria

@DiegoPino DiegoPino merged commit 5e1a046 into 1.4.0 May 22, 2024
@DiegoPino DiegoPino deleted the ISSUE-449 branch May 22, 2024 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Drupal Views Ask and you should receive Drupal 10 Upgrade economy metadata Meta(l) data OpenAPI a small crack in the matrix Search API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant