State
Ghost supports multiple collections. Each collection should own unique resources, because each resource should only have one url.
Problem
If you do not read our docs carefully, it can happen that multiple collections try to own the same resources.
Example:
collections:
/first/:
permalink: /first/{slug}/
filter: tag:en
/second/:
permalink: /second/{slug}/
First collection will query the database and filter out posts which are tagged with "en".
Second collection will query the database without filter. Both will receive a post which is tagged with "en".
This will break pagination because we have to manually remove the "en" tagged posts from the output e.g. you fetch 10 posts on the first page, but we can only display 8 and the second page has another 10 posts. Pagination is broken.
To avoid this, we tell people to use inverse filters.
collections:
/first/:
permalink: /first/{slug}/
filter: tag:en
/second/:
permalink: /second/{slug}/
filter: tag:-en
Solution
Either we keep the restriction for using inverted filters or we have to find a way to mark which post belongs to which collection on the database layer and add a where clause when querying the database. This needs discussion.
A first good step to avoid that people are running into this could be to add a validation rule for the routes.yaml file (if you make use of multiple collections and one of the collections is using a filter, print a warning).
State
Ghost supports multiple collections. Each collection should own unique resources, because each resource should only have one url.
Problem
If you do not read our docs carefully, it can happen that multiple collections try to own the same resources.
Example:
First collection will query the database and filter out posts which are tagged with "en".
Second collection will query the database without filter. Both will receive a post which is tagged with "en".
This will break pagination because we have to manually remove the "en" tagged posts from the output e.g. you fetch 10 posts on the first page, but we can only display 8 and the second page has another 10 posts. Pagination is broken.
To avoid this, we tell people to use inverse filters.
Solution
Either we keep the restriction for using inverted filters or we have to find a way to mark which post belongs to which collection on the database layer and add a where clause when querying the database. This needs discussion.
A first good step to avoid that people are running into this could be to add a validation rule for the routes.yaml file (if you make use of multiple collections and one of the collections is using a filter, print a warning).