mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-23 19:47:16 +09:00
Publishing a legacy project can fail immediately with `Invalid input: expected object, received null`. The editor reads settings from the legacy `pages` field when `projectSettings` is SQL NULL, but the publish snapshot check did not apply that fallback. Read legacy settings from the saved production snapshot when needed, preserving the custom-header plan check and its protection against concurrent edits. No database migration or diagnostic logging is included. Verified through a read-only production database inspection and an isolated reproduction using the affected build row: the previous code throws the exact reported error before calling the publisher; the fix reaches the isolated publisher. No production publishing was performed. - [x] Reproduce the production failure using the original stored row. - [x] Add regression tests for legacy settings and custom-header plan enforcement; verify both fail before the fix and pass afterward. - [x] Pass 40 build tests, 24 domain tests, project-build typecheck, lint, and formatting checks. - [x] Review documentation impact: existing publishing and header behavior is unchanged; no documentation update is needed. - [x] Verify all 42 CI checks, including six Builder end-to-end groups, Linux/Windows fixture checks, and staging deployment. Staging: https://pub.staging.webstudio.is Production data repair, if approved, is separate from this code change.