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

Filtering posts by date, category, etc not working without `filter` #247

Closed
ryelle opened this Issue Oct 28, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@ryelle
Copy link

ryelle commented Oct 28, 2016

Are there plans to update this library now that filter has been removed from the core API? I'm using this for the theme on my site, and can't display archive pages because they're requested using the filter param.

For example, posts().category( 4 ) fetches /posts?filter[cat]=4, while it should be /posts?categories=4.

I'm happy to contribute code, too, if you point me in the right direction :)

@kadamwhite

This comment has been minimized.

Copy link
Collaborator

kadamwhite commented Oct 28, 2016

@ryelle thanks for using the library! There are plans to remove filter(), but since there are also plans to add that parameter back in as a plugin I may leave the code in here so that it can be used as a mixin. Id welcome your thoughts on that idea.

kadamwhite added a commit that referenced this issue Dec 1, 2016

Update category & tag methods for 4.7 parameters (#256)
The removal of `filter` in 4.7 requires substantive changes to how we
do querying by terms. This should address #247

- Update integration tests to account for removal of .filter method
- Add `.categories()` method that takes ID or array of IDs
- Map `.category()` method to use .categoriess() when possible
- Add `.tags()` method that takes ID or array of IDs
- Map `.tag()` method to use .tags() when possible
- Add `.excludeCategories` method
- Add `.excludeTags` method
- Updated bootstrap JSON to remove `.filter`, add new parameters, and add `/settings`
- Add integration tests for `{tax}_exclude` methods
- Improve error handling safeguards in tests
- Update README to remove references to filter
@kadamwhite

This comment has been minimized.

Copy link
Collaborator

kadamwhite commented Dec 1, 2016

This should be resolved in v0.12, now released

@kadamwhite kadamwhite closed this Dec 1, 2016

@kadamwhite kadamwhite removed the in progress label Dec 1, 2016

@kadamwhite

This comment has been minimized.

Copy link
Collaborator

kadamwhite commented Dec 1, 2016

Note that .tags() and .categories() is now preferable to .tag() and .category(), and that the slug-based querying supported by the latter will not work in 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment