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

MESSAGE: The request failed validation #9665

Closed
tiendq opened this issue Jun 5, 2018 · 1 comment
Closed

MESSAGE: The request failed validation #9665

tiendq opened this issue Jun 5, 2018 · 1 comment

Comments

@tiendq
Copy link
Contributor

tiendq commented Jun 5, 2018

Issue Summary

Got error "MESSAGE: The request failed validation." in console log when requesting http://localhost:2368/a/ (post title with a single character a).

To Reproduce

  1. grunt dev --server
  2. Create a post with title a (just single character)
  3. Visit http://localhost:2368/a/

Exception:

NAME: ValidationError
MESSAGE: The request failed validation.

level:normal

Error parsing filter
For more information on how to use filter, see http://api.ghost.org/docs/filter
ValidationError: The request failed validation.
    at new ValidationError (/Users/tiendq/Github/Ghost/node_modules/ghost-ignition/lib/errors/index.js:115:23)
    at Object.combineFilters (/Users/tiendq/Github/Ghost/core/server/models/plugins/filter.js:27:19)
    at Child.fetchAndCombineFilters (/Users/tiendq/Github/Ghost/core/server/models/plugins/filter.js:183:41)
    at Child.applyDefaultAndCustomFilters (/Users/tiendq/Github/Ghost/core/server/models/plugins/filter.js:205:22)
    at Function.findPage (/Users/tiendq/Github/Ghost/core/server/models/base/index.js:686:24)
    at modelQuery (/Users/tiendq/Github/Ghost/core/server/api/posts.js:60:32)
    at runTask (/Users/tiendq/Github/Ghost/core/server/lib/promise/pipeline.js:16:24)
    at /Users/tiendq/Github/Ghost/core/server/lib/promise/pipeline.js:26:20
    at tryCatcher (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/reduce.js:157:18)
    at Object.gotAccum (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/reduce.js:144:25)
    at Object.tryCatcher (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/tiendq/Github/Ghost/node_modules/bluebird/js/release/promise.js:693:18)

Error: Query Error: unrecognized text "a" in filter at char 7
slug:-a+published_at:<='20
------^
    at Object.lexer.parseError (/Users/tiendq/Github/Ghost/node_modules/ghost-gql/dist/parser.js:703:11)
    at Object.next (/Users/tiendq/Github/Ghost/node_modules/ghost-gql/dist/parser.js:586:25)
    at Object.lex (/Users/tiendq/Github/Ghost/node_modules/ghost-gql/dist/parser.js:596:22)
    at lex (/Users/tiendq/Github/Ghost/node_modules/ghost-gql/dist/parser.js:206:27)
    at Parser.parse (/Users/tiendq/Github/Ghost/node_modules/ghost-gql/dist/parser.js:219:26)
    at Object.exports.parse (/Users/tiendq/Github/Ghost/node_modules/ghost-gql/lib/gql.js:19:19)
    at /Users/tiendq/Github/Ghost/core/server/models/plugins/filter.js:24:46
    at arrayMap (/Users/tiendq/Github/Ghost/node_modules/lodash/lodash.js:639:23)
    at Function.map (/Users/tiendq/Github/Ghost/node_modules/lodash/lodash.js:9554:14)
    at Object.combineFilters (/Users/tiendq/Github/Ghost/core/server/models/plugins/filter.js:23:24)
    at Child.fetchAndCombineFilters (/Users/tiendq/Github/Ghost/core/server/models/plugins/filter.js:183:41)
    at Child.applyDefaultAndCustomFilters (/Users/tiendq/Github/Ghost/core/server/models/plugins/filter.js:205:22)
    at Function.findPage (/Users/tiendq/Github/Ghost/core/server/models/base/index.js:686:24)
    at modelQuery (/Users/tiendq/Github/Ghost/core/server/api/posts.js:60:32)
    at runTask (/Users/tiendq/Github/Ghost/core/server/lib/promise/pipeline.js:16:24)
    at /Users/tiendq/Github/Ghost/core/server/lib/promise/pipeline.js:26:20

Technical details:

  • Ghost Version: 1.23.1
  • Node Version: 8.11.1
  • Browser/OS: macOS 10.12.6
@kirrg001
Copy link
Contributor

kirrg001 commented Jun 5, 2018

Duplicate of #9173.

@kirrg001 kirrg001 closed this as completed Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants