Skip to content

fix(core-ts): entryPath accepts the old one-argument call again - #79

Merged
Madraka merged 2 commits into
mainfrom
fix/entry-path-one-argument
Oct 22, 2026
Merged

Madraka merged 2 commits into
mainfrom
fix/entry-path-one-argument

Conversation

@Madraka

@Madraka Madraka commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Urgent. cloudhal.com served blank pages after updating to 0.3.12.

Cause

0.3.11 (RFC-0038 step 1, #72) replaced the renderer's exported entryPath(entry) with core's entryPath(site, entry) under the same name. Theme copies made before then (src/components/EntryList.astro in cloudhal.com, try and every Deploy-button site) still call entryPath(e). With one argument the call threw "Cannot read properties of undefined (reading 'collection')". Astro had already started streaming, so every page with an entry list answered 200 with an empty body.

The tests didn't catch it because they only render the current starter, which was updated in the same PR.

Fix

entryPath has a deprecated overload again: one argument, or a map index as the second (entries.map(entryPath)), returns /<collection>/<slug>. Pass the site to get collection permalinks.

Verified

  • permalinks.test.ts has a new case for both old call forms.
  • On a local site with the old theme copy: before, / returned 51 bytes; after, 185 kB with correct entry links.

Already done

cloudhal.com's site Worker was rolled back to its 0.3.10 build (wrangler rollback) and the cache was purged; Studio stays on 0.3.12.

Follow-ups

  • A test that renders an old theme copy against the current renderer, so breaking theme APIs fail CI.
  • Update cloudhal.com's and try's EntryList to pass the site, so they get permalinks.

🤖 Generated with Claude Code

Madraka and others added 2 commits October 22, 2026 16:28
0.3.11 replaced the renderer's `entryPath(entry)` with core's
`entryPath(site, entry)` under the same exported name. Themes copied from
the starter before then (cloudhal.com, try, Deploy-button sites) call
`entryPath(e)` in `EntryList.astro`; the call threw, Astro had already
started streaming, and every page with an entry list answered 200 with an
empty body. cloudhal.com was rolled back to its 0.3.10 build.

`entryPath` now also takes the old form — one argument, or a `map` index
second — and returns `/<collection>/<slug>` (deprecated overload).
Verified on a site with the old theme copy: the home page renders again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
The 30-day deleted-entry rule measures from the deletion snapshot, which
the store stamps with the real clock, while the test's `now` was a fixed
T0 + 40 days. Once the calendar reached 2026-10-22 the gap was no longer
30 days and the test failed on main too. `now` is now 40 days after the
later of T0 and the real time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka
Madraka merged commit dbe8b87 into main Oct 22, 2026
4 checks passed
@Madraka
Madraka deleted the fix/entry-path-one-argument branch October 22, 2026 13:57
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