Search broken on Docmost 0.25+ — data.items[] API change #8
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The
searchtool throwsitems.map is not a functionon Docmost 0.25.0+.Root Cause
Docmost changed the search API response format in v0.25.0 (February 2026):
response.data.datawas a direct arrayresponse.data.datais now an object{ items: [...], meta: {...} }Reference: https://github.com/docmost/docmost/discussions/1903
In
build/index.jsline 227, the comment even acknowledges the old assumption:items.mapfails becauseitemsis now{ items: [...] }not an array.Fix
This handles both old and new API formats for backwards compatibility.
Environment