Skip to content

fix(public): download pdf from results page - #52

Merged
jokroese merged 1 commit into
mainfrom
download-handover-pdf
May 11, 2026
Merged

fix(public): download pdf from results page#52
jokroese merged 1 commit into
mainfrom
download-handover-pdf

Conversation

@solsarratea

Copy link
Copy Markdown
Collaborator

Bug Fix

"Download handover PDF" button on the result page currently throwing 404.

Reason

SvelteKit intercepts same-origin link clicks and tries to handle them through its client-side router. The router only knows how to render +page routes — a raw PDF response from a +server.ts endpoint has no page component, so the navigation throws a 404.

Proposed Solution

Adds data-sveltekit-reload and download attributes to the two handover-PDF links on the result page

  • data-sveltekit-reload bypasses SvelteKit's client-side router to prevent a real navigation to the PDF URL
  • download hints to save rather than render in-tab.

@solsarratea
solsarratea requested a review from jokroese as a code owner May 11, 2026 13:21
@netlify

netlify Bot commented May 11, 2026

Copy link
Copy Markdown

Deploy Preview for primer-paso-org-portal canceled.

Name Link
🔨 Latest commit f7dddbc
🔍 Latest deploy log https://app.netlify.com/projects/primer-paso-org-portal/deploys/6a01d7d9b11f8700087df857

@netlify

netlify Bot commented May 11, 2026

Copy link
Copy Markdown

Deploy Preview for primer-paso-research canceled.

Name Link
🔨 Latest commit f7dddbc
🔍 Latest deploy log https://app.netlify.com/projects/primer-paso-research/deploys/6a01d7d9740b700008942b15

@netlify

netlify Bot commented May 11, 2026

Copy link
Copy Markdown

Deploy Preview for primer-paso ready!

Name Link
🔨 Latest commit f7dddbc
🔍 Latest deploy log https://app.netlify.com/projects/primer-paso/deploys/6a01d7d99949d800073362cc
😎 Deploy Preview https://deploy-preview-52--primer-paso.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jokroese
jokroese merged commit ed89c97 into main May 11, 2026
14 checks passed
@jokroese
jokroese deleted the download-handover-pdf branch May 11, 2026 13:43
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.

2 participants