Repository navigation
Conversation
ownCloud Web links its contextual help as https://doc.owncloud.com/go?to=<key>, which falls through to the 404 page. Resolve these against a site-level key map, starting with webui-users-sharing. Signed-off-by: Matteo <matteo.sonnenholzner@kiteworks.com>
7e2aa2b to
7ba6cb2
Compare
oc-tmueller
left a comment
There was a problem hiding this comment.
Thanks, this looks good overall. I checked that #sharing resolves (idprefix: ''), that the webui path has no version segment, and that ocis#13254 only emits webui-users-sharing. The parseKey() extraction keeps the old behaviour.
One thing I'd fix before merging is the /go match (inline). The rest are minor.
Also stale and outside the diff: ui/supplemental/partials/head-scripts.hbs:8-9 still says the script "is a no-op unless the path ends in go.php".
Minor and fine to leave: /go/ and /Go aren't matched (the test deliberately locks /go/ → null). GitHub Pages doesn't add a trailing slash, so this only matters if a proxy or link shortener mangles the URL.
Only match /go directly under the site root (optionally behind one project-pages prefix), split the resolver into resolveSiteGo and resolveGoPhp behind resolve(), fall back to webui/index.html for unknown webui-* keys, check mapped anchors in the build test, and update stale comments. Signed-off-by: Matteo <matteo.sonnenholzner@kiteworks.com>
oc-tmueller
left a comment
There was a problem hiding this comment.
Thanks — the approach looks good and the tests pass locally (18 pass, 3 skipped without public/). One correctness issue on production, plus a few smaller notes inline.
Pass site.path to the script via data-site-root and match only <siteRoot>go (or go/) instead of guessing a single-segment prefix, so /webui/go and similar paths are left alone. Fix return-value docstrings, check that anchors are section headings, and share the build check between both maps. Signed-off-by: Matteo <matteo.sonnenholzner@kiteworks.com>
|
@oc-tmueller I did the changes. Please take another look. |
Description
ownCloud Web links its contextual help as
https://doc.owncloud.com/go?to=<key>(e.g. the "Read more" link in the sharing help menus useswebui-users-sharing). This path has no.phpand no server version segment, sogo-redirect.jsignores it and users end up on the 404 page.This extends
go-redirect.jswith a site-levelSITE_MAPPINGresolved against the site root for paths ending in/go:webui-users-sharing→webui/owncloud_web/web_for_users.html#sharingindex.htmlgo.phphandling is unchanged (to=parsing moved into a sharedparseKey())Since the key is resolved on the docs side, already released oCIS versions are fixed as well, and future page moves only need an update here.
Related
go?to=link in Web)Tests
extension-tests/go-redirect.test.js: site-level redirect with and without a path prefix, fallbacks, non-matching paths (/cargo,/go/), and a build check that everySITE_MAPPINGtarget exists inpublic/🤖 Generated with Claude Code