mattermost-community/focalboard · error
invalid property schema
Error message
invalid property schema
What it means
ErrInvalidPropSchema indicates that a board's property schema (the 'cardProperties' definitions) is malformed or cannot be parsed into the expected PropDef structure. ParsePropertySchema returns it so callers can distinguish bad schema data from other failures. It prevents property values from being interpreted against an unusable schema.
Source
Thrown at server/model/properties.go:18
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
//go:generate mockgen -destination=mocks/propValueResolverMock.go -package mocks . PropValueResolver
package model
import (
"encoding/json"
"errors"
"fmt"
"strings"
"github.com/mattermost/focalboard/server/utils"
)
var ErrInvalidBoardBlock = errors.New("invalid board block")
var ErrInvalidPropSchema = errors.New("invalid property schema")
var ErrInvalidProperty = errors.New("invalid property")
var ErrInvalidPropertyValue = errors.New("invalid property value")
var ErrInvalidPropertyValueType = errors.New("invalid property value type")
var ErrInvalidDate = errors.New("invalid date property")
// PropValueResolver allows PropDef.GetValue to further decode property values, such as
// looking up usernames from ids.
type PropValueResolver interface {
GetUserByID(userID string) (*User, error)
}
// BlockProperties is a map of Prop's keyed by property id.
type BlockProperties map[string]BlockProp
// BlockProp represent a property attached to a block (typically a card).
type BlockProp struct {
ID string `json:"id"`
Index int `json:"index"`View on GitHub (pinned to a84bbb65e3)
Solutions
- Fix the board's cardProperties array so every property has a valid id, name, and type.
- Re-create the board or re-import a clean archive if the schema in the DB is corrupted.
- Compare the schema against a working board export to identify the non-conforming property entry.
- Upgrade/outdated clients or migrations so legacy property formats are converted before use.
Example fix
// before: schema entry missing type
{"id":"prp1","name":"Status","options":[]}
// after
{"id":"prp1","name":"Status","type":"select","options":[]} Defensive patterns
Strategy: validation
Validate before calling
func validatePropSchema(props []model.PropDef) error {
for _, p := range props {
if p.ID == "" || p.Name == "" || p.Type == "" {
return fmt.Errorf("property %q missing id/name/type", p.ID)
}
}
return nil
} Type guard
func hasValidSchema(board *model.Board) bool {
for _, p := range board.CardProperties {
if p.ID == "" || p.Type == "" {
return false
}
}
return true
} Try / catch
schema, err := board.ParsePropertySchema()
if errors.Is(err, model.ErrInvalidPropSchema) {
log.Error("board has corrupt cardProperties; repairing or recreating board")
return
} Prevention
- Avoid editing cardProperties directly in the database.
- Test imports/syncs against boards from the same app version.
- Include schema checks in board import/copy routines.
When it happens
Trigger: Calling ParsePropertySchema on a board whose cardProperties array contains entries missing required fields (e.g. id, name, type) or whose JSON cannot unmarshal into the property-definition shape.
Common situations: Boards created by older Focalboard versions with legacy property definitions, boards edited directly in the database, or sync/import from external tools writing non-conforming cardProperties.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- invalid property
- invalid property value
- invalid property value type
- block fields size limit exceeded
- at least one board is required
AI-assisted analysis of mattermost-community/focalboard@a84bbb65e3 (2026-08-30).
Data as JSON: /api/errors/c01166467a50a28d.
Report an issue: GitHub.