Repository navigation
[dtq-dev-93] Fix links, icon and feedback page URL under a non-root base href - #1759
Open
milanmajchrak wants to merge 4 commits into
Open
milanmajchrak wants to merge 4 commits into
milanmajchrak wants to merge 4 commits into
Conversation
The mask url was root-relative, so the browser ignored the base href and got a 404. The '^' prefix makes the build emit a relative url, like the Font Awesome font path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The group form roles link, the request-a-copy item link and the suggestion import notification put a router path in a raw <a href>, which ignores the base href. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The REST API only accepts a page under dspace.ui.url, so a url without the base href got a 400. After a successful submit the form goes back to the router url it started from. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Not a port. The same bugs are on DSpace/dspace-angular
main(checked 2026-11-26), with no upstream issue or PR for them. The links use the fix the fork already has for the "latest version" notice (0e9772a).Description
Under a non-root base href such as
/repository/, the drag handle icon, five links and the feedback page URL miss the base href, so they get a 404 or a 400. Now they include it.Instructions for Reviewers
The router adds the base href to
routerLink, but the browser does not add it to a root-relative URL that skips the router. All fixes below are no-ops when the base href is/.List of changes in this PR:
.drag-iconloadsgrip-vertical.svgwith the^prefix, the same way$fa-font-pathloads the Font Awesome fonts. The build now emits a relative URL, so the icon loads from/repository/assets/....<a href>. The path now goes throughLocation.prepareExternalUrl:handle/...instead of/handle/..., so they open under the base href.dspace.ui.urlwith 400 "unexpected page url was submitted". After a successful submit, the form goes back to the router URL it started from.How to test (UI built with
ui.nameSpace: /repository):grip-vertical.svg. In the build output,*-theme.csshasurl('assets/images/grip-vertical.svg')./repository/handle/.... The same for the item and collection links in Admin > Reports > Items.feedback.recipientand mail set up on the backend, open "Send Feedback" from any page and send it. The Page field has/repositoryin it, the request succeeds, and the form goes back to that page.npm run test -- --include=src/app/access-control/group-registry/group-form/group-form.component.spec.ts --include=src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts --include=src/app/suggestions-page/suggestions-page.component.spec.ts --include=src/app/info/feedback/feedback-form/feedback-form.component.spec.ts --include=src/app/admin/admin-reportsrobots.txtis not part of this PR. The UI serves it at the domain root/robots.txt, so the web server must pass that path to the UI.Codex review (gpt-6.2-sol, high): 1 finding fixed (the return after feedback dropped a final
/index.html). The last round found nothing. Codex review: not run (usage limit) on the last commit, the report links.Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.🤖 Generated with Claude Code