Skip to content

Comment permalink with ?v=<comment version CID> renders not found on web #572

@ion-lion

Description

@ion-lion

Bug

Seed web correctly generates a comment permalink with ?v=<comment-version-cid>, but rendering that URL returns a not-found error when the query param is present. The same comment URL loads correctly if the ?v= query param is removed.

Repro

Open this URL:

https://seedteamtalks.hyper.media/discussions/high-network-usage-in-activity-monitor/:comments/z6MkwRWdU6HY11Qzi9SQZrwSx3rxFw94ipYyiN7Dtbrcg2yU/z6GeWHYXTLa49x?v=bafy2bzacedjrx7zih3zlgvwhlvkpe3lmcvoa67ikvfrvfdqvf2ge4ky6nomhm

Observed: web shows a not found error.

Now remove the query param:

https://seedteamtalks.hyper.media/discussions/high-network-usage-in-activity-monitor/:comments/z6MkwRWdU6HY11Qzi9SQZrwSx3rxFw94ipYyiN7Dtbrcg2yU/z6GeWHYXTLa49x

Observed: comment loads correctly.

Expected behavior

The URL with ?v=bafy2bzacedjrx7zih3zlgvwhlvkpe3lmcvoa67ikvfrvfdqvf2ge4ky6nomhm should render the comment successfully. That CID is the latest comment version and is correct in the URL.

Notes

This looks like the web renderer/router may be interpreting v as a document version or otherwise applying it to the wrong resource when the route is a /:comments/<author>/<commentId> URL. For comment permalinks, v should be accepted as the comment version CID or ignored/fallback gracefully when resolving the comment by author/comment id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bot:triagedGerminator has posted a diagnosis

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions