Skip to content
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

Unable to filter stories by tags with single-letter-slug #9173

Closed
frantzypants opened this issue Oct 23, 2017 · 6 comments
Closed

Unable to filter stories by tags with single-letter-slug #9173

frantzypants opened this issue Oct 23, 2017 · 6 comments
Assignees
Labels
bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost

Comments

@frantzypants
Copy link
Contributor

Issue Summary

Error occurs when attempting to filter stories by tags with symbol in title.

error

Technical details:

  • Ghost Version: 1.15.0 & 1.14.1
  • Browser/OS: Chrome/Mac OS X El Capitan
  • Database: mysql

Steps to Reproduce

  1. Create a new story
  2. Assign tag with a symbol, e.g. C#
  3. Publish Story
  4. Go to Stories
  5. Select tag dropdown and filter by tag with symbol

Expected result should be a list of all stories containing that particular tag, instead an error is produced, and the filtered option remains selected, causing the stories section to be inaccessible until you go back to /ghost/ directly in the URL of the browser

Relevant Screenshots

Post has a tag of C#
Tag C#

Select tag C# to filter stories
Select Tag from List

Error
error

Clicking away to another area within the admin, then going back to stories, error still persists.

Misc
Errors

@ErisDS
Copy link
Member

ErisDS commented Oct 23, 2017

@frantzypants if you still have it available, can you please re-take that screenshot of the network tab, but without the right-side clipped? Or paste the full "requestURL" here, one of the 2 so that I can more easily reproduce. Thanks.

@frantzypants
Copy link
Contributor Author

@ErisDS sure thing:

Request URL:https://frantztest.ghost.io/ghost/api/v0.1/posts/?limit=30&page=1&status=all&staticPages=all&filter=tag%3Ac&formats=mobiledoc%2Cplaintext&include=tags

@ErisDS ErisDS added the bug [triage] something behaving unexpectedly label Oct 23, 2017
@ErisDS ErisDS self-assigned this Oct 23, 2017
@ErisDS ErisDS changed the title Unable to filter stories by tags with symbol in title Unable to filter stories by tags with single-letter-slug Oct 23, 2017
@ErisDS
Copy link
Member

ErisDS commented Oct 23, 2017

Ok cool! It looks like this is a duplicate of this issue: TryGhost/GQL#24 over on the GQL repo (the repo that contains all the code for handling filters).

It's not to do with the special character, but that the slug for the tag is "c" - just a single character.

Can you confirm this is always the case where you see this issue?

I am currently scheduled time to work on improving GQL from next week.

@frantzypants
Copy link
Contributor Author

frantzypants commented Oct 23, 2017

@ErisDS When I had tested a second tag (while trying to see if it was symbols at the time) I made a b@ tag, which converted to just b as the tag slug, and received the same error.

@kirrg001 kirrg001 added the server / core Issues relating to the server or core of Ghost label Oct 25, 2017
@kirrg001 kirrg001 added the NQL label Oct 19, 2018
@kirrg001
Copy link
Contributor

kirrg001 commented Dec 7, 2018

This is still an issue in NQL and it's already tracked.

@ErisDS
Copy link
Member

ErisDS commented Jan 23, 2019

Closing as it is tracked here: https://github.com/NexesJS/NQL-Lang/issues/2

@ErisDS ErisDS closed this as completed Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

No branches or pull requests

3 participants