Skip to content

DataView tabbed settings: booleans/repeaters on inactive tabs are clobbered on save #61

Description

@titus-toia

Verified against v1.0.1 while building a settings page via tangible_object_register_settings() (YAML, multi-tab).

SettingsRenderer::render_tabs() emits only the active tab's fields into the form, but DataView/RequestRouter::extract_post_data() iterates every field in the schema. A checkbox living on any non-active tab is therefore absent from POST — indistinguishable from deliberately unticked — and gets written false. Repeaters on inactive tabs are forced to '[]' the same way. (text fields are safe: they hit a bare continue, never enter $data, and SingularHandler::update() iterates $data only.)

Impact: saving any tab silently turns off booleans on every other tab, with no feedback. In our case the victims were safety-relevant checkboxes; we moved them to constants as a workaround. Practical consequence for consumers until fixed: a safety-relevant checkbox cannot live on a multi-tab settings page.

Suggested fix: scope the missing-boolean/repeater defaulting to fields that were actually rendered (the router knows the active layout), or emit hidden inputs for inactive tabs' current values.

Found during the tangible-learndash-merge build (Erik Dalton engagement), 2026-07-30. Full notes: tangible-solulu repo, skills/building-tangible-plugins/references/field-notes-2026-07.md §E.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions