Skip to content

Fix page links returning 404 in server mode#1671

Open
st0012 wants to merge 2 commits intomasterfrom
fix-server-pages-404
Open

Fix page links returning 404 in server mode#1671
st0012 wants to merge 2 commits intomasterfrom
fix-server-pages-404

Conversation

@st0012
Copy link
Copy Markdown
Member

@st0012 st0012 commented Apr 4, 2026

Summary

  • TopLevel#parser= was passing absolute_name to Store#update_parser_of_file, but @files_hash is keyed by relative_name. The lookup always failed, so @text_files_hash was never populated and find_text_page always returned nil — making every page link in the sidebar 404.
  • Changed the call to pass relative_name instead, and renamed the parameter in update_parser_of_file for consistency.
  • Added a unit test for the deferred-parser path and integration tests for server page routing.

st0012 added 2 commits April 4, 2026 01:20
`TopLevel#parser=` was calling `update_parser_of_file` with
`absolute_name`, but `@files_hash` is keyed by `relative_name`.
The lookup always failed, so `@text_files_hash` was never populated
and `find_text_page` always returned nil.
These tests exercise the full pipeline: parsing source files, then
resolving page URLs through the server's route method. They verify
that text pages (.md, .rdoc), class pages, the index, and 404s all
work correctly. The text page tests would have caught the
update_parser_of_file key mismatch bug.
@matzbot
Copy link
Copy Markdown
Collaborator

matzbot commented Apr 4, 2026

🚀 Preview deployment available at: https://c9681a98.rdoc-6cd.pages.dev (commit: de0e722)

@st0012 st0012 added the bug label Apr 4, 2026
@st0012 st0012 marked this pull request as ready for review April 4, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants