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.

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.

/communities/create sends undefined request to the API

1 participant