saberland/saber

Available posts is incorrect with saber-plugin-query-posts and categories #578

sustained posted onGitHub

<!-- Please don't delete this template or we'll close your issue -->

<!-- Before creating an issue please make sure you are using the latest version of Saber. -->

<!-- Issues which contain questions or support requests will be closed. -->

<!-- Please ask questions via following several ways. -->

<!-- https://chat.saber.land/ -->

<!-- https://stackoverflow.com/questions/ask?tags=saberjs -->

Bug report

I have 3 posts in the _posts directory and each has a different category.

For my blog layout that has injectAllPosts: true all 3 posts are present.

For my category layout, only the first post I created shows for all 3 categories.

Steps to reproduce

<!-- If you are reporting a bug that can ONLY be reproduced on your repository, PLEASE provide this repo link. That takes guessing work out of the way and saves us time. -->

<!-- You can also use this CodeSandbox starter https://bit.ly/2IlcpNF -->

https://github.com/sustained/sustained-saber

What is expected?

That, for my category layout, page.posts would:

  1. contain all posts OR
  2. contain only the posts in the category page.category

What is actually happening?

Only the first post I created is present for all categories.

Other relevant information

  • Result of running saber -v: 0.11.4
  • Is Saber a global or local install? Local
  • Which package manager did you use for the install? NPM
  • Does this issue occur when all plugins are disabled? Can't disable the plugin because the issue relates to the plugin.

PEBKAC.

posted by sustained over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests