-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Inverse tag filtering in dynamic routing works incorrectly #9950
Comments
Noticed following on this page: https://docs.ghost.org/docs/dynamic-routing
Tried to change order of route definitions -- no effect. |
@vladimir-vg Hey :) Will look at your report on Monday! |
Thanks! If you need more information don't hesitate to ask. |
I can't reproduce this 🤔 I tagged two posts with |
@kirrg001 I just wanted to report same thing. |
@cotko Could you please share your routes.yaml file? Thanks 👍 |
@kirrg001 Just tried with the one @vladimir-vg posted above and it's the same. If you go and edit some of the posts and just remove all tags from them, you will see that they disappear from the blog at the default route, where tag:-en is used. Then if you tag those posts again with anything but en they appear again. |
Thanks. Will play with this. I guess it's caused by having posts with no tags at all 🤔 |
Okay had some more time to reproduce now. Can confirm, inverse filtering does not work correctly. I think i even see a couple of bugs with negation. This filter troubles:
Dynamic Routing is currently in beta. We will work on this report as soon as possible 👍 Thanks for your help. |
Little update: This mis-behaviour is caused by GQL. GQL generates the wrong queries. We will fix that in NQL and not in GQL. NQL is the "new" GQL, but it's not finished yet. Ghost does not fully use NQL yet. I've raised an issue in NQL to keep track of it. See also this issue. |
Similar/Same report: #9923 |
Okay, so current workaround: create any tag and attach to all stories. |
This bug was fixed in Ghost 2.8.0. |
I confirm this it is working.
|
I guess the team is on top of it, but it's still very confusing for a newcomer, even with plenty technical background. I have the following
However, @pascalandy's fix works, applying a channel for So, is it fixed, ref @kirrg001 mentions v2.8.0 above, but latest is 2.26.0 (am I missing s.th?), or the workaround tagging all posts by vladimir-vg, or pascalandy's by using a channel-controller? |
refs #10105, closes #10108, closes TryGhost/Ghost#9950, refs TryGhost/Ghost#9923, refs TryGhost/Ghost#9916, refs TryGhost/Ghost#9574, refs TryGhost/Ghost#6345, refs TryGhost/Ghost#6309, refs TryGhost/Ghost#6158, refs TryGhost/GQL#16 - removed GQL dependency - replaced GQL with our brand new NQL implementation - fixed all known filter limitations - GQL suffered from some underlying filter bugs, which NQL tried to fix - the bugs were mostly in how we query the database for relation filtering - the underlying problem was caused by a too simple implementation of querying the relations - mongo-knex has implemented a more robust and complex filtering mechanism for relations - replaced logic in our bookshelf filter plugin - we pass the custom, default and override filters from Ghost to NQL, which then are getting parsed and merged into a mongo JSON object. The mongo JSON is getting attached by mongo-knex. NQL: https://github.com/NexesJS/NQL mongo-knex: https://github.com/NexesJS/mongo-knex
refs #10105, closes #10108, closes TryGhost/Ghost#9950, refs TryGhost/Ghost#9923, refs TryGhost/Ghost#9916, refs TryGhost/Ghost#9574, refs TryGhost/Ghost#6345, refs TryGhost/Ghost#6309, refs TryGhost/Ghost#6158, refs TryGhost/GQL#16 - removed GQL dependency - replaced GQL with our brand new NQL implementation - fixed all known filter limitations - GQL suffered from some underlying filter bugs, which NQL tried to fix - the bugs were mostly in how we query the database for relation filtering - the underlying problem was caused by a too simple implementation of querying the relations - mongo-knex has implemented a more robust and complex filtering mechanism for relations - replaced logic in our bookshelf filter plugin - we pass the custom, default and override filters from Ghost to NQL, which then are getting parsed and merged into a mongo JSON object. The mongo JSON is getting attached by mongo-knex. NQL: https://github.com/NexesJS/NQL mongo-knex: https://github.com/NexesJS/mongo-knex
refs #10105, closes #10108, closes TryGhost/Ghost#9950, refs TryGhost/Ghost#9923, refs TryGhost/Ghost#9916, refs TryGhost/Ghost#9574, refs TryGhost/Ghost#6345, refs TryGhost/Ghost#6309, refs TryGhost/Ghost#6158, refs TryGhost/GQL#16 - removed GQL dependency - replaced GQL with our brand new NQL implementation - fixed all known filter limitations - GQL suffered from some underlying filter bugs, which NQL tried to fix - the bugs were mostly in how we query the database for relation filtering - the underlying problem was caused by a too simple implementation of querying the relations - mongo-knex has implemented a more robust and complex filtering mechanism for relations - replaced logic in our bookshelf filter plugin - we pass the custom, default and override filters from Ghost to NQL, which then are getting parsed and merged into a mongo JSON object. The mongo JSON is getting attached by mongo-knex. NQL: https://github.com/NexesJS/NQL mongo-knex: https://github.com/NexesJS/mongo-knex
refs #10105, closes #10108, closes TryGhost/Ghost#9950, refs TryGhost/Ghost#9923, refs TryGhost/Ghost#9916, refs TryGhost/Ghost#9574, refs TryGhost/Ghost#6345, refs TryGhost/Ghost#6309, refs TryGhost/Ghost#6158, refs TryGhost/GQL#16 - removed GQL dependency - replaced GQL with our brand new NQL implementation - fixed all known filter limitations - GQL suffered from some underlying filter bugs, which NQL tried to fix - the bugs were mostly in how we query the database for relation filtering - the underlying problem was caused by a too simple implementation of querying the relations - mongo-knex has implemented a more robust and complex filtering mechanism for relations - replaced logic in our bookshelf filter plugin - we pass the custom, default and override filters from Ghost to NQL, which then are getting parsed and merged into a mongo JSON object. The mongo JSON is getting attached by mongo-knex. NQL: https://github.com/NexesJS/NQL mongo-knex: https://github.com/NexesJS/mongo-knex
Issue Summary
Collection route renders page with zero items, when inverse tag filter is specified.
To Reproduce
If I rewrite
filter: tag:-en
asfilter: tag:-[en]
it has same effect.Interestingly, if I comment out
filter: tag:-en
for the/
route, then behavior is reversed. Empty list for/en/
(unexpected) and all stories for/
(expected).Technical details:
No errors in
/var/www/ghost/content/logs/http___vladimir_vg_me__production.error.log
. Just empty file.This is the website: http://vladimir-vg.me
The text was updated successfully, but these errors were encountered: