-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Author slug with one letter causes failed filter #20133
Comments
Hey, I am Tanu sharma having 2 year of exp in SDE field can I take this issue? |
Can confirm with current Ghost(Pro) trial; disagree somewhat with the 'low' categorization. It's stressful to a new user as the error message is so unrelated as to cause general alarm of having broken everything :). Once the cause is known (thanks for submitting this issue!), it can be resolved easily for the existing user. |
This looks to be deep within @tryghost/nql-lang... |
Speaking of which... I'm pretty sure this is a duplicate of TryGhost/NQL#20 |
Agreed. Should retitle this issue “bad slugs generated on user creation”….
I've filed a PR that makes it impossible to get into this state (since fixing the NQL issue is a bigger issue)
|
fixes #20133 - includes fix to support single letter slugs
fixes #20133 - includes fix to support single letter slugs
fixes #20133 - includes fix to support single letter slugs
fixes TryGhost#20133 - includes fix to support single letter slugs
Issue Summary
A staff member that signs up with a single-letter first name upon invitation will not be able to use Ghost at all. They only see an error message in the Ghost admin:
Looking at the network requests, the request to
/ghost/api/admin/posts/?formats=mobiledoc%2Clexical&limit=30&page=1&filter=status%3A%5Bdraft%2Cscheduled%2Cpublished%2Csent%5D%2Bauthors%3Aj
fails.As soon as the last filter is removed, the API request succeeds:
https://tireless-buzzard.pikapod.net/ghost/api/admin/posts/?formats=mobiledoc%2Clexical&limit=30&page=1&filter=status%3A%5Bdraft%2Cscheduled%2Cpublished%2Csent%5D
I have then tried to change the author slug in the database from "j" to "jb" – and things started to work.
This has been tested in different environments, both locally with development configurations, as well as on different managed hosts. Ghost v5.82.2 and v5.82.6 have been tested, both from the CLI as well as Docker images.
Steps to Reproduce
Ghost Version
v5.82.6
Node.js Version
18 LTS
How did you install Ghost?
Ghost CLI
Database type
MySQL 8
Browser & OS version
Mac OS 14.4.1, latest Chrome and latest Safari tested
Relevant log / error output
Code of Conduct
The text was updated successfully, but these errors were encountered: