siyuan-note/siyuan · warning
Please specify the daily note save path in the Notebook Sett
Error message
Please specify the daily note save path in the Notebook Settings
What it means
Thrown by CreateDailyNote when the notebook's box configuration has no DailyNoteSavePath set (empty string or literal '/'). Conf.Language(49) = 'Please specify the daily note save path in the Notebook Settings'. Daily notes require a Go-template path (e.g., '/Daily Notes/{{now | date "2006/01"}}/{{now | date "2006-01-02"}}') to know where to create the note; without it, the function cannot proceed.
Source
Thrown at kernel/model/file.go:1422
const (
DailyNoteAttrPrefix = "custom-dailynote-"
NodeAttrTitleEmpty = "custom-sy-title-empty"
DocHiddenAttr = "custom-hidden"
)
func CreateDailyNote(boxID string) (p string, existed bool, err error) {
createDocLock.Lock()
defer createDocLock.Unlock()
box := Conf.Box(boxID)
if nil == box {
err = ErrBoxNotFound
return
}
boxConf := box.GetConf()
if "" == boxConf.DailyNoteSavePath || "/" == boxConf.DailyNoteSavePath {
err = errors.New(Conf.Language(49))
return
}
hPath, err := RenderGoTemplateInBox(boxConf.DailyNoteSavePath, box.ID)
if err != nil {
return
}
FlushTxQueue()
hPath = util.TrimSpaceInPath(hPath)
existRoot := treenode.GetBlockTreeRootByHPath(box.ID, hPath)
if nil != existRoot {
existed = true
p = existRoot.Path
tree, loadErr := LoadTreeByBlockID(existRoot.RootID)
if nil != loadErr {View on GitHub (pinned to 251596fc0d)
Solutions
- Open Notebook Settings for the target notebook and set the Daily Note Save Path template.
- Set a default daily note save path programmatically via the notebook configuration API before calling CreateDailyNote.
- In UI flows, detect an empty DailyNoteSavePath and prompt the user to configure it before attempting creation.
- For programmatic callers, pre-validate boxConf.DailyNoteSavePath and show a configuration dialog if empty.
Example fix
// before
p, existed, err := model.CreateDailyNote(boxID)
// after
box := conf.Box(boxID)
if box != nil {
bc := box.GetConf()
if bc.DailyNoteSavePath == "" || bc.DailyNoteSavePath == "/" {
return "", false, errors.New("configure daily note save path first")
}
}
p, existed, err := model.CreateDailyNote(boxID) Defensive patterns
Strategy: validation
Validate before calling
// Pre-check: ensure daily note save path is configured
box := conf.Box(boxID)
if box == nil {
return "", false, errors.New("notebook not found")
}
bc := box.GetConf()
if bc.DailyNoteSavePath == "" || bc.DailyNoteSavePath == "/" {
return "", false, errors.New("configure daily note save path in notebook settings")
} Type guard
func hasDailyNotePath(boxID string) bool {
box := conf.Box(boxID)
if box == nil {
return false
}
bc := box.GetConf()
return bc.DailyNoteSavePath != "" && bc.DailyNoteSavePath != "/"
} Prevention
- Check boxConf.DailyNoteSavePath before calling CreateDailyNote.
- Configure the daily note save path as part of notebook creation workflows.
- In UI code, detect the missing path and prompt the user to configure it.
When it happens
Trigger: Calling CreateDailyNote(boxID) on a notebook whose boxConf.DailyNoteSavePath is unset. This happens for newly created notebooks that haven't been configured, or notebooks imported from templates that don't include a daily-note path.
Common situations: A new notebook is created and the user immediately presses the daily-note shortcut without configuring the save path. A notebook was imported/migrated and the daily note setting was lost. The user is on a fresh workspace and hasn't set up notebook preferences yet.
Related errors
- 0
- invalid box id
- path belongs to encrypted notebook [%s]: %s
- --notebook is required
- --notebook is required
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/983e44647739391e.
Report an issue: GitHub.