siyuan-note/siyuan · warning

invalid card field full row value [%v]

Error message

invalid card field full row value [%v]

What it means

Returned by setAttrViewColFullRow (attribute_view.go:1769), dispatched through the transaction action "setAttrViewColFullRow". The handler type-asserts operation.Data to bool; if the assertion fails (Data is not a Go bool — e.g. a string "true", a number, or null) it returns this error. A JSON true/false decodes to a Go bool, so the failure indicates a non-boolean payload.

Source

Thrown at kernel/model/attribute_view.go:1769

	default:
		return av.ErrWrongLayoutType
	}

	err = av.SaveAttributeView(attrView)
	return
}

func (tx *Transaction) doSetAttrViewColFullRow(operation *Operation) (ret *TxErr) {
	if err := setAttrViewColFullRow(operation); nil != err {
		return &TxErr{code: TxErrHandleAttributeView, id: operation.AvID, msg: err.Error()}
	}
	return
}

func setAttrViewColFullRow(operation *Operation) (err error) {
	fullRow, ok := operation.Data.(bool)
	if !ok {
		return fmt.Errorf("invalid card field full row value [%v]", operation.Data)
	}

	attrView, err := av.ParseAttributeView(operation.AvID)
	if err != nil {
		return
	}
	view, err := getAttrViewOperationView(attrView, operation)
	if err != nil {
		return
	}

	found := false
	switch view.LayoutType {
	case av.LayoutTypeGallery:
		for _, field := range view.Gallery.CardFields {
			if field.ID == operation.ID {
				field.FullRow = fullRow
				found = true

View on GitHub (pinned to 251596fc0d)

Solutions

  1. Send a real JSON boolean (true/false) in operation.data for this action.
  2. Do not stringify or numericize the flag; the kernel type-asserts to bool, not to a string/number.
  3. If building the operation generically, special-case boolean fields to emit JSON booleans.

Example fix

// before: stringified flag
transaction({ op: "setAttrViewColFullRow", data: "true" })

// after: real boolean
transaction({ op: "setAttrViewColFullRow", data: true })
Defensive patterns

Strategy: type-guard

Validate before calling

// Ensure a real JSON boolean, not a string/number/null.
if (typeof data !== 'boolean') throw new Error('fullRow must be a boolean')

Type guard

function isFullRowFlag(v: unknown): v is boolean {
  return typeof v === 'boolean'
}

Prevention

When it happens

Trigger: Frontend sends setAttrViewColFullRow with data as a string ("true"/"false"), a number (1/0), or null instead of a JSON boolean. The fullRow flag controls whether a card field occupies an entire row in gallery/kanban layouts.

Common situations: Plugin serializes a boolean as 1/0 or "true"; older frontend build sending a stringified value; a generic update helper that wraps all values in strings.

Related errors


AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12). Data as JSON: /api/errors/dea6c7b2fc19865c. Report an issue: GitHub.