Skip to content

UFAL/Fix: preserve namespace in OAI link rewrite on static pages (#1226)#1227

Merged
milanmajchrak merged 1 commit intodtq-devfrom
ufal/oai-pmh-static-page-fix
Feb 27, 2026
Merged

UFAL/Fix: preserve namespace in OAI link rewrite on static pages (#1226)#1227
milanmajchrak merged 1 commit intodtq-devfrom
ufal/oai-pmh-static-page-fix

Conversation

@milanmajchrak
Copy link
Collaborator

Problem description

Fixes #1226

The OAI link rewrite in static pages used new URL('/server/oai', restBase) which discarded the namespace prefix (e.g. /repository) from rest.baseUrl. Replaced with direct string append so the full path is preserved.

Added test for namespace-prefixed baseUrl scenario.

Analysis

(Write here, if there is needed describe some specific problem. Erase it, when it is not needed.)

Problems

(Write here, if some unexpected problems occur during solving issues. Erase it, when it is not needed.)

Sync verification

If en.json5 or cs.json5 translation files were updated:

  • Run yarn run sync-i18n -t src/assets/i18n/cs.json5 -i to synchronize messages, and changes are included in this PR.

Manual Testing (if applicable)

Copilot review

  • Requested review from Copilot

Copilot AI review requested due to automatic review settings February 27, 2026 10:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the static-page OAI hyperlink rewrite so it preserves any namespace prefix embedded in rest.baseUrl (e.g. /repository/server), matching the expected deployment routing.

Changes:

  • Replace new URL('/server/oai', restBase) with a trailing-slash-safe string append to preserve rest.baseUrl path prefixes.
  • Update and extend unit tests to cover namespace-prefixed rest.baseUrl and prevent double slashes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/app/static-page/static-page.component.ts Adjust OAI URL construction to keep the full rest.baseUrl path (including namespace prefixes).
src/app/static-page/static-page.component.spec.ts Update existing test inputs and add a new test for namespace-prefixed rest.baseUrl.

@milanmajchrak milanmajchrak merged commit 31adb31 into dtq-dev Feb 27, 2026
8 of 9 checks passed
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.

UFAL/Static page - the OAI redirect link does not contain namespace

2 participants