Fixes from the reference site: 404 page unlisted, own-origin media, fillGlobal defaults, switcher docs

- sitemap, llms.txt and the site index leave out the page assigned as the 404
  page (unlistedPageIds, exported); it stays when it is also the homepage
- buildImagesConfig: in production with R2_PUBLIC_URL empty, allow the site's
  own /api/media/file/** so next/image no longer answers 400
- fillGlobal: a choice field (select, radio, checkbox, number, date) still at its
  defaultValue counts as empty; text is never overwritten
- docs: LanguageSwitcher renderLabel needs a 'use client' wrapper (i18n.md,
  ipal-site, ipal-setup, api.md)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 15:29:07 +01:00
co-authored by Claude Opus 5.5
parent d992d131a2
commit 3645e61f7d
19 changed files with 171 additions and 18 deletions
+1 -1
View File
@@ -203,7 +203,7 @@ is an error for that record, never an empty relation. Ready pages made of librar
|---|---|
| `upsertBySlug(collection, data \| data[], { slugField })` | matches by the default-locale slug (`slugField`, default `slug`). With an array, missing records are created first (without fields that hold `$page` / `$form` links), then every record gets its full content, so pages can link to each other in any order |
| `upsertBy(collection, key, data)` | matches by other natural keys, e.g. `{ title: 'Contact form' }` (all keys must match, default locale) |
| `fillGlobal(slug, data)` | fills only the global's empty fields (the default locale decides). With `update` and an untouched global: every seeded field |
| `fillGlobal(slug, data)` | fills only the global's empty fields (the default locale decides). A choice — select, radio, checkbox, number, date — still at the field's `defaultValue` counts as empty (Payload stores defaults on the first save, so `defaultTheme: 'system'` can be seeded over `light`); text is never treated so, even when it equals a default. With `update` and an untouched global: every seeded field |
| `summary()` | prints the summary and returns `{ created, skipped, updated, skippedEdited, errors }` |
Each method prints one line per record (see [Running a seed](#running-a-seed)) and returns