{"record":{"id":"983e44647739391e","repo":"siyuan-note/siyuan","slug":"please-specify-the-daily-note-save-path-in-the-not","errorCode":null,"errorMessage":"Please specify the daily note save path in the Notebook Settings","messagePattern":"Please specify the daily note save path in the Notebook Settings","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/file.go","lineNumber":1486,"sourceCode":"const (\n\tDailyNoteAttrPrefix = \"custom-dailynote-\"\n\tNodeAttrTitleEmpty  = \"custom-sy-title-empty\"\n\tDocHiddenAttr       = \"custom-hidden\"\n)\n\nfunc CreateDailyNote(boxID string) (p string, existed bool, err error) {\n\tcreateDocLock.Lock()\n\tdefer createDocLock.Unlock()\n\n\tbox := Conf.Box(boxID)\n\tif nil == box {\n\t\terr = ErrBoxNotFound\n\t\treturn\n\t}\n\n\tboxConf := box.GetConf()\n\tif \"\" == boxConf.DailyNoteSavePath || \"/\" == boxConf.DailyNoteSavePath {\n\t\terr = errors.New(Conf.Language(49))\n\t\treturn\n\t}\n\n\thPath, err := RenderGoTemplateInBox(boxConf.DailyNoteSavePath, box.ID)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tFlushTxQueue()\n\n\thPath = util.TrimSpaceInPath(hPath)\n\texistRoot := treenode.GetBlockTreeRootByHPath(box.ID, hPath)\n\tif nil != existRoot {\n\t\texisted = true\n\t\tp = existRoot.Path\n\n\t\ttree, loadErr := LoadTreeByBlockID(existRoot.RootID)\n\t\tif nil != loadErr {","sourceCodeStart":1468,"sourceCodeEnd":1504,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/afa823b6b4e4f183511e0bc0a3be93caa94c7c97/kernel/model/file.go#L1468-L1504","documentation":"model.CreateDailyNote requires the target notebook to have a daily-note save path configured: if boxConf.DailyNoteSavePath is empty or \"/\", the localized \"Please specify the daily note save path in the Notebook Settings\" (Conf.Language(49)) is returned and no daily note is created. Reached from POST /api/filetree/createDailyNote and from appendDailyNoteBlock/prependDailyNoteBlock, which auto-create today's daily note.","triggerScenarios":"POST /api/filetree/createDailyNote (or /api/block/appendDailyNoteBlock, /api/block/prependDailyNoteBlock) for a notebook whose Notebook Settings never set a Daily note save path, or where it was cleared/set to '/'.","commonSituations":"Freshly created notebooks used as daily-note targets; API users assuming a global default applies per notebook; imported notebooks without settings.","solutions":["Open Notebook Settings - Daily note and set a save path template such as /Daily Notes/{{now | date \"2006-01-02\"}}","Or set it programmatically via POST /api/notebook/setNotebookConf with conf.dailyNoteSavePath","Then retry the daily-note creation"],"exampleFix":"# before\nPOST /api/filetree/createDailyNote {\"notebook\":\"20260101120000-abcdef\"}\n-> \"Please specify the daily note save path in the Notebook Settings\"\n\n# after: configure the notebook first, then create\nPOST /api/notebook/setNotebookConf\n{ \"notebook\": \"20260101120000-abcdef\", \"conf\": { \"dailyNoteSavePath\": \"/Daily Notes/{{now | date \\\"2006-01-02\\\"}}\" } }\nPOST /api/filetree/createDailyNote {\"notebook\":\"20260101120000-abcdef\"}","handlingStrategy":"validation","validationCode":"box := model.Conf.Box(boxID)\nif box == nil {\n\treturn model.ErrBoxNotFound\n}\nconf := box.GetConf()\nif conf.DailyNoteSavePath == \"\" || conf.DailyNoteSavePath == \"/\" {\n\treturn errors.New(\"configure DailyNoteSavePath for this notebook first\")\n}\np, existed, err := model.CreateDailyNote(boxID)","typeGuard":"func hasDailyNoteConfig(boxID string) bool {\n\tbox := model.Conf.Box(boxID)\n\tif box == nil {\n\t\treturn false\n\t}\n\tp := box.GetConf().DailyNoteSavePath\n\treturn p != \"\" && p != \"/\"\n}","tryCatchPattern":null,"preventionTips":["Set a daily-note path when programmatically creating notebooks","Check the notebook conf before wiring daily-note shortcuts"],"tags":["daily-note","notebook","configuration","filetree","create"],"backgroundTag":"missing-configuration","analyzedSha":"afa823b6b4e4f183511e0bc0a3be93caa94c7c97","analyzedAt":"2026-08-18T17:04:10.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}