GET /posts fails with ?limit=all
parameter on SQLite instances
#11303
Labels
bug
[triage] something behaving unexpectedly
help wanted
[triage] Ideal issues for contributors to help with
pinned
[triage] Ignored by stalebot
server / core
Issues relating to the server or core of Ghost
Issue Summary
The issue happens when running Ghost 3.0 on the SQLite database with the number of posts having
posts_meta
records that exceed 999.When issuing the following Admin API request (same works for Content API):
It fails with 400,
type: BadRequestError
andcode: SQLITE_ERROR
.In the internal logs following error show up:
It's a direct result of
SELECT
statement that has all posts listed inIN
clause when the max limit for SQL parameters is 999.Relevant discussion and small workaround the issue: #11300.
To Reproduce
meta_*
entriesGET /posts
with?limit=all
parameter (e.g. through Ghost-SDK with following script https://gist.github.com/gargol/b71619cb04d35e0de97a91f8b41f95a0)The expectation would be having all posts fetched with no error.
Technical details:
The text was updated successfully, but these errors were encountered: