Skip to content

Fix redirect of resource-part URIs to ResourcePartPage#443

Merged
tkuhn merged 1 commit intomasterfrom
fix-resource-part-redirect
Apr 20, 2026
Merged

Fix redirect of resource-part URIs to ResourcePartPage#443
tkuhn merged 1 commit intomasterfrom
fix-resource-part-redirect

Conversation

@tkuhn
Copy link
Copy Markdown
Contributor

@tkuhn tkuhn commented Apr 20, 2026

Summary

  • Closes URIs for maintained resource parts don't properly resolve #442
  • w3id.org forwards every /spaces/... URI to /space?id=<uri>, so term URIs within a maintained resource's namespace (e.g. https://w3id.org/spaces/marine-biodiversity/r/ontology/hasWaterbody) landed on SpacePage and returned a 500 because neither SpaceRepository.findById nor MaintainedResourceRepository.findById matched.
  • SpacePage.resolveSpace now falls back to MaintainedResourceRepository.findByNamespace (using MaintainedResource.getNamespace(id)) and, when a containing resource is found, restarts to ResourcePartPage with the proper context.
  • Also adds ensureLoaded() to findByNamespace for consistency with findById.

Test plan

  • Verified locally: the URI from the issue now resolves to the resource-part page.
  • Existing space and maintained-resource URIs still resolve as before (no regression).

🤖 Generated with Claude Code

Resolves #442. w3id.org forwards every /spaces/... URI to /space?id=<uri>,
so term URIs within a maintained resource's namespace (e.g.
.../r/ontology/hasWaterbody) landed on SpacePage and threw 500 because
neither findById lookup matched. SpacePage.resolveSpace now falls back to
MaintainedResourceRepository.findByNamespace and, if a containing resource
is found, restarts to ResourcePartPage with the proper context. Also adds
ensureLoaded() to findByNamespace for consistency with findById.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tkuhn tkuhn merged commit 9febb6c into master Apr 20, 2026
8 checks passed
@tkuhn tkuhn deleted the fix-resource-part-redirect branch April 20, 2026 10:09
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.

URIs for maintained resource parts don't properly resolve

1 participant