-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Open
Labels
needs:triage[triage] this needs to be triaged by the Ghost team[triage] this needs to be triaged by the Ghost team
Description
Issue Summary
Content API browse() method throws IncorrectUsageError when using include parameter with filter parameter in Ghost 6.0. The error message states "The model layer expects using withRelated", but withRelated is not a documented parameter for the Content API.
Steps to Reproduce
Steps to Reproduce
- Use Ghost Content API SDK v5.0 against hosted Ghost CMS
- Call
posts.browse()with bothfilterandincludeparameters:
const posts = await ghostContentAPI.posts.browse({
filter: 'tag:some-tag',
include: 'tags'
})- Error is thrown
Expected Behavior
According to the Ghost Content API documentation, the include parameter should work with the browse() method to include related resources like tags. This should work regardless of whether a filter parameter is used.
Actual Behavior
The API throws an IncorrectUsageError:
{
"errors": [
{
"message": "Incorrect usage error, cannot list posts.",
"context": "The model layer expects using `withRelated`.",
"type": "IncorrectUsageError"
}
]
}Ghost Version
6.0 (hosted Ghost CMS - SaaS)
Node.js Version
Your version - I don't have visibility to hosted Ghost CMS environment
How did you install Ghost?
Hosted ghost CMS
Database type
MySQL 8 (I assume - again this is hosted Ghost CMS, I don't own this enviroment)
Browser & OS version
Chrome, MacOS 15.1.1
Relevant log / error output
{
"errors": [
{
"message": "Incorrect usage error, cannot list posts.",
"context": "The model layer expects using `withRelated`.",
"type": "IncorrectUsageError"
}
]
}Code of Conduct
- I agree to be friendly and polite to people in this repository
Metadata
Metadata
Assignees
Labels
needs:triage[triage] this needs to be triaged by the Ghost team[triage] this needs to be triaged by the Ghost team