Skip to content

Relative links on release-notes index pages resolve to wrong URL (404) #375

Description

@digitaldiina

Summary

Relative links (./..., ../...) authored on index.md/index.mdx pages under release-notes/ resolve to the wrong URL in production and 404. Reported case: clicking "version 12.2" on https://docs.superoffice.com/release-notes lands on https://docs.superoffice.com/12/index, missing the release-notes/ segment, instead of /release-notes/12.

Root cause

Any page built from a literal index.md/index.mdx file is served at its folder's own bare path with no trailing slash (for example release-notes/12/index.mdx serves at /release-notes/12). Standard relative-URL resolution drops the last URL segment as if it were a filename. That's correct for a real leaf page, but wrong here, since that segment is the folder itself.

So a link written as ./12/index on release-notes/index.mdx resolves against the parent of /release-notes (the site root) instead of against /release-notes/, producing /12/index.

Confirmed empirically:

  • Leaf pages, for example en/admin/getting-started.mdx, resolve ./ and ../ links correctly, since their own URL segment really is a filename.
  • Every vulnerable link found is on a literal index.md/index.mdx file. No non-index filename exhibits the bug.
  • No config-level fix exists. There is no trailingSlash setting in docs.json, so this has to be corrected at the link level.

Scope

45 index.md/index.mdx files exist under release-notes/. 42 of them contain at least one vulnerable relative link, covering every version back to 8.5, not just 11/12. release-notes/index.mdx itself has 5 vulnerable version/topic links (./11/index, ./12/index, ./10.5/index, ./mobile/index, ./integrations/index) plus two more severely broken cross-tree links (../en/developer-portal/widgets/index#publish-status, ../en/onsite/version-history) that escape past the site root entirely. release-notes/12/index.mdx and release-notes/11/index.mdx each have 3 vulnerable reverse links (../index#pilot, ../mobile/index, ../integrations/index).

contribute/markdown-guide/links-in-docs.mdx currently documents the wrong behavior for index-page relative links. This needs correcting alongside the fix so future authors don't reproduce the bug.

Fix

Convert every vulnerable relative link across the release-notes/ tree to a root-relative absolute path, matching the convention already used by the site's working links, and correct the markdown-guide's authoring guidance.

The same vulnerable pattern (index pages with relative links crossing into a subfolder) also exists outside release-notes/, across several en//integrations/ trees and other languages. That's tracked separately as a follow-up issue rather than blocking this fix.

Scope note

Out of scope for this issue: everything outside release-notes/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    broken-linkTriage: One or more links don't work or have the wrong targetrelease-notesSubject matter: release notes for a new SuperOffice version

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions