Skip to content

fix: avoid undefined community breadcrumb lookup - #6208

Open
dvd233 wants to merge 1 commit into
DSpace:mainfrom
dvd233:codex/contrib-dspace-6168-breadcrumb-guard
Open

fix: avoid undefined community breadcrumb lookup#6208
dvd233 wants to merge 1 commit into
DSpace:mainfrom
dvd233:codex/contrib-dspace-6168-breadcrumb-guard

Conversation

@dvd233

@dvd233 dvd233 commented Sep 8, 2026

Copy link
Copy Markdown

References

Fixes #6168

Description

When opening the top-level community creation route, the community breadcrumb resolver is configured with breadcrumbQueryParam: 'parent', but no parent query parameter is present. The resolver currently falls back to the route id, which is also absent on /communities/create, and requests the REST endpoint with undefined.

Return an empty breadcrumb result when the optional parent parameter is absent. Existing community routes and sub-community creation routes continue to resolve their breadcrumbs normally.

Instructions for Reviewers

List of changes in this PR:

  • Skip the community data lookup for top-level community creation.
  • Add resolver coverage for normal routes, parent-community creation, and top-level creation.

To verify:

  • Open New → Community as an administrator.
  • Confirm that creating a top-level community does not issue a request to /api/core/communities/undefined.
  • Confirm that creating a sub-community still loads the parent breadcrumb.

Testing

  • TypeScript semantic check for the resolver and regression spec.
  • Resolver branch harness: baseline fails on the top-level route; the fix passes all three route cases.
  • Prettier check for the changed files.
  • git diff --check.

The full repository npm test suite was not run locally because the dependency tree is not installed in this environment; CI should run the repository's standard checks.

@lgeggleston

Copy link
Copy Markdown
Contributor

Hi @dvd233, thanks for your first contribution to DSpace. Since the issue was submitted recently, @MMilosz would you be willing to take a quick look at this fix maybe?

One note on the DSpace GitHub process for future PRs: we encourage you to comment on the issue (in this case, #6168) when you start working on it, ideally before submitting a PR. This allows us to assign the issue to you, check if there are any blockers, and avoid multiple people accidentally working on the same issue. Thanks!

@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace 11.0 Release Sep 14, 2026
@lgeggleston lgeggleston added bug 1 APPROVAL pull request only requires a single approval to merge component: Community Community display or editing port to dspace-10_x This PR needs to be ported to `dspace-10_x` branch for next bug-fix release labels Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge bug component: Community Community display or editing port to dspace-10_x This PR needs to be ported to `dspace-10_x` branch for next bug-fix release

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

/communities/create sends undefined request to the API

2 participants