siyuan-note/siyuan · error
new item template field [%s] value mode is invalid
Error message
new item template field [%s] value mode is invalid
What it means
Error "new item template field [%s] value mode is invalid" thrown in siyuan-note/siyuan.
Source
Thrown at kernel/model/attribute_view_new_item.go:549
}
isNotTime := true
if nil != key.Date {
isNotTime = !key.Date.FillSpecificTime
}
value = &av.Value{Type: av.KeyTypeDate, Date: av.NewFormattedValueDate(createdAt.UnixMilli(), 0, av.DateFormatNone, isNotTime, false)}
case av.NewItemFieldValueStatic:
if nil == fieldValue.Value || fieldValue.Value.Type != key.Type {
return nil, fmt.Errorf("new item template field [%s] value is invalid", keyID)
}
value = fieldValue.Value.Clone()
if av.KeyTypeRelation == key.Type {
filterNewItemTemplateRelationValue(attrView, key, value)
if nil == value.Relation || 0 == len(value.Relation.BlockIDs) {
continue
}
}
default:
return nil, fmt.Errorf("new item template field [%s] value mode is invalid", keyID)
}
ret[keyID] = value
}
return
}
func filterNewItemTemplateRelationValue(attrView *av.AttributeView, key *av.Key, value *av.Value) {
if nil == key.Relation || nil == value.Relation {
return
}
targetAv := attrView
if key.Relation.AvID != attrView.ID {
targetAv, _ = av.ParseAttributeView(key.Relation.AvID)
}
if nil == targetAv {
value.Relation.BlockIDs = nil
return
}View on GitHub (pinned to 251596fc0d)
Solutions
- Use a supported value mode for the template field (e.g. fixed value or current time where applicable).
- Correct the mode string in the template configuration.
Example fix
Set the template field's value mode to a documented mode such as 'fixed' instead of an unknown string.
When it happens
Trigger: Applying a new-item template whose field uses an unrecognized value mode.
Common situations: Occurs when a new-item template field carries an unknown value mode, usually from a newer app version or a hand-edited template.
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/aa2aaaee68018111.
Report an issue: GitHub.