siyuan-note/siyuan · warning

Conf.Language(204)

Error message

Conf.Language(204)

What it means

Export2Liandi refuses to send documents that belong to the built-in user guide notebook. Guides are shipped documentation and are excluded from publishing to the Liandi community (issue #8388), so the kernel returns the localized message Conf.Language(204) instead of attempting the upload.

Solutions

  1. Copy the content into a regular (non-user-guide) notebook and send that document to Liandi instead.
  2. Check IsUserGuide on the tree's box ID before invoking Export2Liandi and show an appropriate message.
  3. Do not use the built-in user guide notebook for real publishing workflows.

Example fix

// before
Export2Liandi(guideDocBlockID)
// after
if !model.IsUserGuide(boxID) {
    Export2Liandi(blockID)
}
Defensive patterns

Strategy: validation

Validate before calling

tree, _ := model.LoadTreeByBlockID(blockID)
if tree != nil && model.IsUserGuide(tree.Box) {
    return errors.New("cannot send user guide docs to Liandi")
}
err := model.Export2Liandi(blockID)

Try / catch

if err != nil {
    if strings.Contains(err.Error(), model.Conf.Language(204)) {
        // hide/disable the send-to-Liandi action for guide docs
    }
    return err
}

Prevention

When it happens

Trigger: Calling Export2Liandi (directly or through the 'send to Liandi' UI action) with a blockID whose tree's box satisfies IsUserGuide(tree.Box).

Common situations: Trying to publish a page from the bundled user guide notebook; scripts or tests that reuse a guide block ID as sample data.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at kernel/model/export.go:422

		return nil
	})
	return
}

func Export2Liandi(id string) (err error) {
	if err = prepareExportBlockAssets(id, false); err != nil {
		return
	}
	err = withExportReadLockByBlockID(id, func() error {
		tree, loadErr := LoadTreeByBlockID(id)
		if loadErr != nil {
			logging.LogErrorf("load tree by block id [%s] failed: %s", id, loadErr)
			return loadErr
		}

		if IsUserGuide(tree.Box) {
			// Doc in the user guide no longer supports one-click sending to the community https://github.com/siyuan-note/siyuan/issues/8388
			return errors.New(Conf.Language(204))
		}

		assets := getAssetsLinkDests(tree.Root, false)
		embedAssets := getQueryEmbedNodesAssetsLinkDests(tree.Root)
		assets = append(assets, embedAssets...)
		assets = gulu.Str.RemoveDuplicatedElem(assets)
		_, err = uploadAssets2Cloud(assets, bizTypeExport2Liandi, false)
		if err != nil {
			return err
		}

		msgId := util.PushMsg(Conf.Language(182), 15000)
		defer util.PushClearMsg(msgId)

		// 判断帖子是否已经存在,存在则使用更新接口
		const liandiArticleIdAttrName = "custom-liandi-articleid"
		const liandiArticleIdAttrNameOld = "custom-liandi-articleId" // 兼容旧属性名
		foundArticle := false

View on GitHub (pinned to 9f775e8a12)