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

[route] collection filters do not apply correctly on /: #10230

Closed
pascalandy opened this Issue Dec 1, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@pascalandy

pascalandy commented Dec 1, 2018

Hello folks!

I'm following from this conversation in the forum. My goal is to filter out some tags from the Ghost’s homepage.

EDIT: Little hack

For now, this works

Issue

I’m applying this yaml but no filtering occurs on https://mysite.com/en/
EDIT: The result in my case, is that those tags ([how-to, about, under-the-hood]) do still appears in Ghost’s homepage.

To be clear about my domains:

# filters out few tags from Ghost's homepage
routes:
  /:
    controller: channel
    filter: tag:-[how-to,about,under-the-hood]

# redefine the collections as I we can't define /: twice
collections:
  /archive/:
    permalink: /{slug}/
    template:
      - index

# default values
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

Technical details:

  • Ghost Version: 2.1.1
  • CLI version: 1.9.4
  • Node Version: 10.14.10
  • Browser/OS: chrome 66, osx 10.13.4
  • Server-side: Alpine:3.8 in Docker using this image
  • Database: sqlite
@pascalandy

This comment has been minimized.

pascalandy commented Dec 1, 2018

Looks similar to #9950 but not sure.

@pascalandy pascalandy changed the title from [route], collection filter does not apply to [route] collection filters do not apply correctly on /: Dec 1, 2018

@kirrg001 kirrg001 self-assigned this Dec 3, 2018

@kirrg001

This comment has been minimized.

Contributor

kirrg001 commented Dec 3, 2018

Hey 👋

Looks similar to #9950 but not sure.

Correct 👍 I guess you are running into this bug. Inverse tag (relation) filtering is broken in Ghost.

This comment might help you to understand what exactly does not work.

We are currently working on #10105 to get rid of the known filter bugs.


Just double checking.

I’m applying this yaml but no filtering occurs on https://mysite.com/en/

Could you please expand what you mean by "no filtering occurs"? Could you please describe the behaviour you see?

Thanks :)

@kirrg001 kirrg001 added the needs info label Dec 3, 2018

@pascalandy

This comment has been minimized.

pascalandy commented Dec 3, 2018

I mean the posts with those tags ([how-to, about, under-the-hood]) still appears in Ghost’s homepage.

I’m applying this yaml but no filtering occurs on https://mysite.com/en/


Thanks for all the details. Can't wait to have feature running smoothly :-)

@kirrg001

This comment has been minimized.

Contributor

kirrg001 commented Dec 3, 2018

I mean the posts with those tags ([how-to, about, under-the-hood]) still appears in Ghost’s homepage.

But i guess each of these posts, who still appear, have multiple tags attached e.g. how-to and something-else?

Thanks for all the details. Can't wait to have feature running smoothly :-)

ME2 🤩

@pascalandy

This comment has been minimized.

pascalandy commented Dec 4, 2018

Some yes and some no.

But I guess each of these posts, who still appear, have multiple tags attached e.g. how-to and something-else?

@pascalandy

This comment has been minimized.

pascalandy commented Dec 4, 2018

Little hack

Instead of filtering out, I decided to limit to. I can perfectly live with this :)

# filters out few tags from Ghost's homepage
routes:
  /:
    controller: channel
    filter: tag:[article,proof]
# excluding: [about,under-the-hood,how-to]
		
# redefine the collections as I we can't define /: twice
collections:
  /archive/:
    permalink: /{slug}/
    template:
      - index

# default values
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/
@kirrg001

This comment has been minimized.

Contributor

kirrg001 commented Dec 4, 2018

Thanks for coming back 🙂 Happy you found a workaround for now 👍

I'd suggest to close this issue for now in favour of #9950. We are actively working on this problem currently. Won't take very long till it get shipped 👻

@kirrg001 kirrg001 closed this Dec 4, 2018

@pascalandy

This comment has been minimized.

pascalandy commented Dec 4, 2018

Make sense! Thank you for your devotion, Katharina.

@kirrg001 kirrg001 referenced this issue Dec 5, 2018

Closed

Replace GQL with NQL (filter plugin) #10105

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