siyuan-note/siyuan · warning
Conf.Language(118)
Error message
Conf.Language(118)
What it means
MoveDocs enforces the file-tree depth limit: resulting path depth (target slash count plus the moved subtree's own depth) may not exceed 6 levels unless 'Allow create deeper documents' is enabled (key 118). It is a settings-driven pre-check that fails before any file is touched.
Solutions
- Enable Settings - File Tree - 'Allow create deeper documents' (AllowCreateDeeper)
- Move the subtree to a shallower target path
- Split or flatten the source hierarchy before moving
Example fix
// before
await fetchPost('/api/filetree/moveDocs', {fromPaths: deepPaths, toNotebook: boxID, toPath: '/a/b/c/d/e'})
// after
const depth = toPath.split('/').length - 1 + childDepth
if (depth > 6 && !allowCreateDeeper) { /* flatten or enable setting */ }
await fetchPost('/api/filetree/moveDocs', {fromPaths: deepPaths, toNotebook: boxID, toPath: '/a/b'}) Defensive patterns
Strategy: validation
Validate before calling
const depth = toPath.split('/').length - 1 + childDepth(fromPaths); if (depth > 6 && !conf.fileTree.allowCreateDeeper) throw new Error('Move would exceed depth limit') Try / catch
try { await fetchPost('/api/filetree/moveDocs', args) } catch (e) { if (String(e).includes('7 levels deep')) { /* flatten or enable AllowCreateDeeper */ } } Prevention
- Know the current AllowCreateDeeper setting before deep moves
- Keep the tree within 6 levels when automation is involved
- Prefer shallow targets for deep subtrees
When it happens
Trigger: moveDocs where strings.Count(toPath,'/') + childDepth > 6 and Conf.FileTree.AllowCreateDeeper is false.
Common situations: Moving deep subtrees into already-nested folders; importing outlines with many nesting levels; users unaware the depth cap is enabled by default.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- Conf.Language(118)
- The current settings do not allow the creation of…
- 26
- agent HTTP tools support HTTP, HTTPS and SOCKS5 proxies
- AI configuration is unavailable
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/67a142ff58be5a3a.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/model/file.go:1745
}
}
if 1 == len(fromPaths) {
// 移动到自己的父文档下的情况相当于不移动,直接返回
if fromBox := pathsBoxes[fromPaths[0]]; nil != fromBox && fromBox.ID == toBoxID {
parentDir := path.Dir(fromPaths[0])
if ("/" == toPath && "/" == parentDir) || (parentDir+".sy" == toPath) {
return
}
}
}
// 检查路径深度是否超过限制
for _, fromPath := range fromPaths {
fromBox := pathsBoxes[fromPath]
childDepth := util.GetChildDocDepth(filepath.Join(util.DataDir, fromBox.ID, fromPath))
if depth := strings.Count(toPath, "/") + childDepth; 6 < depth && !Conf.FileTree.AllowCreateDeeper {
err = errors.New(Conf.Language(118))
return
}
}
// 禁止跨加密边界移动文档:加密笔记本是孤岛,不同加密笔记本各有独立 DEK,
// 跨边界移动(普通↔加密、加密 A↔加密 B)会导致密文用错 DEK 损坏数据
for _, fromPath := range fromPaths {
fromBox := pathsBoxes[fromPath]
if fromBox.ID != toBox.ID && !IsSameCryptoBoundary(fromBox.ID, toBox.ID) {
err = errors.New(Conf.Language(391))
return
}
}
// A progress layer appears when moving more than 64 documents at once https://github.com/siyuan-note/siyuan/issues/9356
subDocsCount := 0
for _, fromPath := range fromPaths {
fromBox := pathsBoxes[fromPath]View on GitHub (pinned to 9f775e8a12)