siyuan-note/siyuan · error

Conf.Language(49)

Error message

Conf.Language(49)

What it means

CreateDailyNote requires the notebook's 'Daily Note save path' setting (DailyNoteSavePath) to be a non-empty path other than '/'. The message is the localized key 49: 'Please specify the daily note save path in the Notebook Settings'. It is thrown before any document is created.

Solutions

  1. Open Notebook Settings and set the daily note save path to a valid path like '/Daily Notes/{{now | date "2006-01"}}/{{now | date "2006-01-02"}}'
  2. Verify boxConf.DailyNoteSavePath via conf API before automating daily notes
  3. Target the correct notebook that actually has daily notes configured

Example fix

// before
await fetchPost('/api/filetree/createDailyNote', {notebook: boxID})
// after
const conf = (await fetchPost('/api/notebook/getNotebookConf', {notebook: boxID})).data
if (!conf.dailyNoteSavePath || conf.dailyNoteSavePath === '/') throw new Error('Configure daily note save path first')
await fetchPost('/api/filetree/createDailyNote', {notebook: boxID})
Defensive patterns

Strategy: validation

Validate before calling

const conf = (await fetchPost('/api/notebook/getNotebookConf', {notebook: boxID})).data; if (!conf.dailyNoteSavePath || conf.dailyNoteSavePath === '/') throw new Error('Daily note path not configured')

Try / catch

try { await fetchPost('/api/filetree/createDailyNote', {notebook: boxID}) } catch (e) { if (String(e).includes('daily note save path')) { /* prompt user to configure */ } }

Prevention

When it happens

Trigger: Calling CreateDailyNote / dailynoteCreate / dailynoteAppend / dailynotePrepend for a notebook whose DailyNoteSavePath is unset or equals '/'.

Common situations: Freshly created notebook where daily-note settings were never configured; settings reset after a config migration or sync; automation targeting the wrong notebook whose config is empty.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/3cd64c7a405d546e. Report an issue: GitHub.

Appendix: source

Thrown at kernel/model/file.go:1448

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 9f775e8a12)