siyuan-note/siyuan · error
Conf.Language(112)
Error message
Conf.Language(112)
What it means
RenameTag rejects a new tag label containing marker characters (characters with special meaning in SiYuan's tag/hierarchy syntax, e.g. markers checked by treenode.ContainsMarker). The localized message Conf.Language(112) is formatted with the offending character so the user knows exactly which character is illegal.
Source
Thrown at kernel/model/tag.go:128
indexHistoryDir(filepath.Base(historyDir), util.NewLute())
sql.FlushQueue()
reloadTreeIDs = gulu.Str.RemoveDuplicatedElem(reloadTreeIDs)
for _, id := range reloadTreeIDs {
ReloadProtyle(id)
}
updateAttributeViewBlockText(updateNodes)
sql.FlushQueue()
util.PushClearProgress()
return
}
func RenameTag(oldLabel, newLabel string) (err error) {
if invalidChar := treenode.ContainsMarker(newLabel); "" != invalidChar {
return fmt.Errorf(Conf.Language(112), invalidChar)
}
newLabel = strings.TrimPrefix(newLabel, "/")
newLabel = strings.TrimSuffix(newLabel, "/")
newLabel = strings.TrimSpace(newLabel)
if "" == newLabel {
return errors.New(Conf.Language(114))
}
if oldLabel == newLabel {
return
}
util.PushEndlessProgress(Conf.Language(110))
util.RandomSleep(500, 1000)
tags := sql.QueryTagSpansByLabel(oldLabel)View on GitHub (pinned to 8641553a1f)
Solutions
- Remove the reported invalid character from the new tag name and retry
- Sanitize the label before calling the API: strip marker characters and verify treenode.ContainsMarker returns ""
- Pre-validate in the UI/dialog before submitting the rename request
Example fix
// before: new label contains a marker character
newLabel := "project/todo"
// after: sanitized label
newLabel := "project-todo"
if c := treenode.ContainsMarker(newLabel); c != "" { /* reject before calling RenameTag */ } Defensive patterns
Strategy: validation
Validate before calling
function assertValidTagName(label) {
// marker characters must be absent before calling RenameTag
const markers = /[\\/<>"'|?*:#[\]]/; // extend to full marker set used by treenode.ContainsMarker
const m = label.match(markers);
if (m) throw new Error(`tag name contains invalid character: ${m[0]}`);
} Try / catch
try {
await fetchPost("/api/tag/renameTag", { oldLabel, newLabel });
} catch (e) {
if (/invalid character/i.test(e.message)) {
// extract the offending character from the message and re-prompt the user
}
} Prevention
- Sanitize tag labels from user input/clipboard before renaming
- Reject any label where a marker-character check fails, before the API call
- Strip or escape markup-like characters when generating tag names programmatically
- Show the offending character (the error formats it) back to the user in UI flows
When it happens
Trigger: Calling RenameTag (via renameTag API, tagRename, or a programmatic caller) with newLabel containing any character returned by treenode.ContainsMarker — e.g. characters that would break tag-tree parsing or block content markers.
Common situations: Paste of text containing markup/markdown special characters into the rename dialog; automation building tag names from arbitrary strings without sanitization; including slash/hierarchy separators where not allowed after trimming.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Do not include Markdown syntax marker [%s]
- Tag cannot be empty
- custom emoji name must not be empty
- invalid custom emoji name
- Conf.Language(37)
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/d4a78d4dd65599a9.
Report an issue: GitHub.