siyuan-note/siyuan · error

[/api/av/batchSetAttributeViewBlockAttrs] parameter [rowID]…

Error message

[/api/av/batchSetAttributeViewBlockAttrs] parameter [rowID] is deprecated, visit [https://github.com/siyuan-note/siyuan/issues/15727] for details

What it means

The batchSetAttributeViewBlockAttrs API no longer accepts the legacy 'rowID' key inside cell objects; callers must use the new row identifier key. Passing 'rowID' logs a warning and returns this error pointing to GitHub issue 15727. The parameter is scheduled for removal after 2026-12-01.

Solutions

  1. Rename the 'rowID' field in each cell object to the current row identifier key expected by the API (see issue 15727)
  2. Update plugin code to the new batchSetAttributeViewBlockAttrs payload schema
  3. Regenerate or update client bindings from the latest API docs
  4. Migrate before 2026-12-01 when the parameter is deleted outright

Example fix

// before
{"keyID": "k1", "rowID": "r1", "value": {...}}
// after
{"keyID": "k1", "rowID" -> replaced per issue 15727, e.g. {"keyID": "k1", "id": "r1", "value": {...}}}
Defensive patterns

Strategy: validation

Validate before calling

for (const cell of payload) {
  if ("rowID" in cell) throw new Error("rowID is deprecated; migrate per https://github.com/siyuan-note/siyuan/issues/15727");
}

Try / catch

try { await batchSetBlockAttrs(payload); } catch (e) { if (String(e).includes("rowID\"] is deprecated")) { migratePayloadToNewSchema(); retry(); } else { throw e; } }

Prevention

When it happens

Trigger: Calling POST /api/av/batchSetAttributeViewBlockAttrs with cell objects that contain a 'rowID' field instead of the replacement identifier; older plugin or script payloads written against the deprecated API shape.

Common situations: Plugins not updated after the API rename; copy-pasted old example code; third-party integrations built before the deprecation; gradual migration where some payloads still use the old key.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


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

Appendix: source

Thrown at kernel/model/attribute_view.go:7996

	attrView, err := av.ParseAttributeView(avID)
	if err != nil {
		return
	}

	var cells []*AttrViewCellUpdate
	for _, value := range values {
		v := value.(map[string]any)
		keyID := v["keyID"].(string)
		var itemID string
		if _, ok := v["itemID"]; ok {
			itemID = v["itemID"].(string)
		} else if _, ok := v["rowID"]; ok {
			// TODO 该参数将于 2026 年 12 月 1 日后删除
			itemID = v["rowID"].(string)
			msg := fmt.Sprintf("[%s] parameter [%s] is deprecated, visit [https://github.com/siyuan-note/siyuan/issues/15727] for details",
				"/api/av/batchSetAttributeViewBlockAttrs", "rowID")
			logging.LogWarn(msg)
			err = errors.New(msg)
			return
		}
		cells = append(cells, &AttrViewCellUpdate{KeyID: keyID, RowID: itemID, Data: v["value"]})
	}
	if err = preflightAttributeViewCellBindings(tx, attrView, cells); err != nil {
		return
	}
	for _, cell := range cells {
		_, err = updateAttributeViewValue(tx, attrView, cell.KeyID, cell.RowID, cell.Data, false)
		if err != nil {
			return
		}
	}
	regenAttrViewGroups(attrView)
	if err = av.SaveAttributeView(attrView); err != nil {
		return
	}
	refreshRelatedSrcAvs(avID, tx)

View on GitHub (pinned to 9f775e8a12)