Skip to content

Register core.reading and core.writing setting keys #525

Description

@tayebmokni

Summary

`packages/go/settings/core.go::CoreSettings` registers `core.site.` and `core.permalinks.format` but no `core.reading.` or `core.writing.*` keys. The admin Reading and Writing sub-pages render against an empty registry — the form is blank.

Admin pages affected:

  • `/settings/reading` — expects: posts_per_page, show_on_front (page|posts), homepage_page_id, posts_page_id, posts_format
  • `/settings/writing` — expects: default_category, default_post_format, default_editor

Fix

Extend `CoreSettings()` (or split into `CoreReadingSettings()` + `CoreWritingSettings()` if growth warrants) with the missing keys. Each key needs:

  • group prefix (`core.reading.` / `core.writing.`)
  • JSON-Schema validator
  • default value
  • description

Then `adminsettings.Mount` picks them up automatically — no main.go change needed.

Blocked by

This issue depends on the PATCH write path being fixed first (the namespace column bug; separate issue). Until PATCH works, reading sub-page would still 500 on save even with the keys registered.

Acceptance

  • `/api/v1/settings?group=core.reading` returns the registered defaults.
  • Admin Reading page renders inputs for each key.
  • Save round-trips correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions