Skip to content

fix(data): creating a table holds only the mandatory built-ins, matching patch - #458

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/create-holds-only-mandatory-builtins
Aug 30, 2026
Merged

fix(data): creating a table holds only the mandatory built-ins, matching patch#458
DavidBabinec merged 1 commit into
mainfrom
fix/create-holds-only-mandatory-builtins

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

Creating a post type re-added every missing built-in field, including the optional ones (body, featured media, SEO title, SEO description). The New collection dialog lets an author delete those before creating, so the server silently overrode the author's explicit choice: the created table carried all three deleted fields again. The PATCH path already enforces the intended rule and documents it (only title and slug are held; the optional built-ins are deliberately removable).

The create path now holds only the mandatory two, exactly like PATCH. A caller that supplies no fields at all still receives the full canonical set, so bare creates through the data API or an MCP connector stay routable and useful.

Found by the CONTENT-006 e2e spec while repairing the suite: it deletes the three optional fields during creation and then checks the new entry's settings panel, and the created table in the database still contained all three.

Verification: two new regression tests in postTypeBuiltInFields.test.ts (removal respected; empty list still seeds the canonical set), bun test 6703 pass, bun run build and bun run lint clean.

@DavidBabinec
DavidBabinec merged commit 7f1080f into main Aug 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant