LearnNewsExamplesServices
Frontmatter
id19901
titleBlog posts' relative links leave the Portal and 404
stateClosed
labels
bughelp wantedaiportal
assigneesneo-gemini-maryam
createdAtOct 20, 2026, 1:13 PM
updatedAtOct 21, 2026, 11:06 AM
githubUrlhttps://github.com/neomjs/neo/issues/19901
authorneo-opus-ada
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 21, 2026, 11:06 AM

Blog posts' relative links leave the Portal and 404

Closed v13.3.0/archive-v13-3-0-chunk-2 bughelp wantedaiportal
neo-opus-ada
neo-opus-ada commented on Oct 20, 2026, 1:13 PM

Claim it first: comment on this issue before you start, and check the open pull requests for one that already points here. We merge the first approve-worthy PR (see CONTRIBUTING.md, point 3).

Context

Found in team:engine release testing of the Portal (the neomjs.com app, apps/portal), 2026-10-20, in headless Chrome against the dev server on origin/dev 4844087a77.

To reproduce, open #/news/blog/blog/the-organism-already-existed and click the "DynamicGrids.md" link. The tab leaves the app for http://localhost:8080/apps/guides/datahandling/DynamicGrids.md and gets a 404 ("Cannot GET …"). The v10 series' links between its posts fail the same way: ./v10-post1-love-story.md resolves to /apps/portal/v10-post1-love-story.md. Reproduced 2/2.

The Problem

learn/blog/ holds relative .md links on 23 lines across 7 posts. They work on GitHub, where they are files next to each other, but in the Portal none of them reaches a page.

The Architectural Reality

  • src/app/content/Component.mjs#rewriteLinks rewrites a relative .md href onto contentRoute. It returns the HTML unchanged when contentRoute is not set (if (!contentRoute || !me.record?.id) return html).
  • apps/portal/view/learn/Component.mjs sets contentRoute: '#/learn/'. apps/portal/view/news/blog/Component.mjs extends the same ContentComponent and sets none, so a blog post's links are never rewritten.
  • A post's targets resolve under learn/. Some are sibling posts (learn/blog/…, routed #/news/blog/blog/<slug>), and some are guides (learn/guides/…, routed #/learn/<id>). A single contentRoute therefore covers only one of the two.
  • Design authority: rewriteLinks' own summary, "Rewrites relative Markdown links onto contentRoute". The blog component inherits it and opts out by omission.

The Fix

In the blog component, route a resolved target under learn/blog/ to the blog view and any other learn/ target to the learn view. Reuse rewriteLinks and resolveContentId rather than adding a second link rewriter.

Acceptance Criteria

  • AC-1: in the Portal, "DynamicGrids.md" in the-organism-already-existed opens #/learn/guides/datahandling/DynamicGrids, and a v10 post's link to ./v10-post1-love-story.md opens that post in the blog view.
  • AC-2: a unit test covers both kinds of target, plus an absolute URL that stays as written.

Out of Scope

  • Links that point at moved or deleted files, filed separately.

Related

  • src/app/content/Component.mjs, buildScripts/util/check-relative-links.mjs (the build-time guard, which passes these links because the files exist).

unowned-rationale: for an outside contributor or the Portal's next maintainer; a maintainer reviews the pull request.

Live latest-open sweep: checked the latest 20 open issues at 2026-10-20T11:12Z, plus an open-issue search for "portal blog relative link": no equivalent. MC sweep: no prior decision. Own-assignment sweep: none overlapping.

Origin Session ID: ad84dc14-8baf-4f95-a7dd-a9e224f51c31

tobiu closed this issue on Oct 21, 2026, 11:06 AM
tobiu referenced in commit 60eda8f - "fix(portal): rewrite relative blog links to blog and learn routes (#19901) (#19937)" on Oct 21, 2026, 11:06 AM