{"record":{"id":"b3e58ecd6286dac0","repo":"siyuan-note/siyuan","slug":"new-item-template-field-s-not-found-b3e58e","errorCode":null,"errorMessage":"new item template field [%s] not found","messagePattern":"new item template field \\[(.+?)\\] not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/attribute_view_new_item.go","lineNumber":524,"sourceCode":"\tif isAbsolute {\n\t\tparent = \"/\" + parent\n\t}\n\treturn parent\n}\n\nfunc newItemTitleFromPath(renderedPath string) string {\n\tif \"\" == renderedPath || strings.HasSuffix(renderedPath, \"/\") {\n\t\treturn \"\"\n\t}\n\treturn normalizeDocTitle(path.Base(renderedPath))\n}\n\nfunc resolveNewItemFieldValues(attrView *av.AttributeView, itemTemplate *av.NewItemTemplate, createdAt time.Time) (ret map[string]*av.Value, err error) {\n\tret = map[string]*av.Value{}\n\tfor keyID, fieldValue := range itemTemplate.FieldValues {\n\t\tkey, getErr := attrView.GetKey(keyID)\n\t\tif nil != getErr || nil == key {\n\t\t\treturn nil, fmt.Errorf(\"new item template field [%s] not found\", keyID)\n\t\t}\n\t\tvar value *av.Value\n\t\tswitch fieldValue.Mode {\n\t\tcase av.NewItemFieldValueCurrentTime:\n\t\t\tif av.KeyTypeDate != key.Type {\n\t\t\t\treturn nil, fmt.Errorf(\"new item template field [%s] current time value is invalid\", keyID)\n\t\t\t}\n\t\t\tisNotTime := true\n\t\t\tif nil != key.Date {\n\t\t\t\tisNotTime = !key.Date.FillSpecificTime\n\t\t\t}\n\t\t\tvalue = &av.Value{Type: av.KeyTypeDate, Date: av.NewFormattedValueDate(createdAt.UnixMilli(), 0, av.DateFormatNone, isNotTime, false)}\n\t\tcase av.NewItemFieldValueStatic:\n\t\t\tif nil == fieldValue.Value || fieldValue.Value.Type != key.Type {\n\t\t\t\treturn nil, fmt.Errorf(\"new item template field [%s] value is invalid\", keyID)\n\t\t\t}\n\t\t\tvalue = fieldValue.Value.Clone()\n\t\t\tif av.KeyTypeRelation == key.Type {","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/attribute_view_new_item.go#L506-L542","documentation":"Error \"new item template field [%s] not found\" thrown in siyuan-note/siyuan.","triggerScenarios":"Applying a new-item template that references a column which was deleted or renamed in the database.","commonSituations":"Occurs when a new-item template references a field that has been deleted from the attribute view after the template was configured.","solutions":["Confirm the field name/ID exists in the template; field IDs change when a column is re-created.","Refresh the template configuration and retry with an existing field."],"exampleFix":"Open the new-item template editor and re-map the value to one of the currently listed fields.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}