You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pattern API: Search requests ignore other API parameters #547
changed the title [-]Pattern API: Search parameter seems to override the allowed_blocks filter[/-][+]Pattern API: Search requests ignore other API parameters[/+]on Jan 24, 2023
It was noted in #57501-core that the offset, order, and orderby params are not applied to search results in core API requests.
❌ Make sure search still works (search):
/wp-json/wp/v2/pattern-directory/patterns/?search=plants
🟢 search works alone, and along with the per_page and page parameters.
🔴 search is not affected by the offset, orderby, or order parameters.
This is an issue with the wporg API itself— you can test with https://api.wordpress.org/patterns/1.0/?search=form&offset=2. The results don't change despite the offset change.
Activity
Search: Sync the `wpop_contains_block_types` meta to ElasticSearch
Search: Filter the search results based on block types.
ryelle commentedon Jan 23, 2023
I think this issue will also happen if the
author_nameis passed to the API (see #549).[-]Pattern API: Search parameter seems to override the allowed_blocks filter[/-][+]Pattern API: Search requests ignore other API parameters[/+]ryelle commentedon Jan 24, 2023
It was noted in #57501-core that the
offset,order, andorderbyparams are not applied to search results in core API requests.This is an issue with the wporg API itself— you can test with
https://api.wordpress.org/patterns/1.0/?search=form&offset=2. The results don't change despite the offset change.