Skip to content

Conversation

@JorgeEscire
Copy link

References

Fixes #2672

Description

The /404, /500, and /403 error pages did not update the browser tab title from the i18n translation files. The title remained as the default "DSpace" instead of reflecting the translated page name.

The fix adds data: { title: '...' } to the error page route definitions in app-routes.ts, which allows the existing HeadTagService to automatically pick up and set the translated title following the standard format (e.g., DSpace Repository :: Page not found).

Instructions for Reviewers

List of changes in this PR:

  • Added data: { title: '500.page-internal-server-error' } to the /500 route
  • Added data: { title: '403.forbidden' } to the /403 route
  • Added data: { title: '404.page-not-found' } to the ** wildcard (404) route

How to test:

  1. Start the application locally
  2. Navigate to the following error pages and check the browser tab title:
    • /500 → Should display DSpace Repository :: Service unavailable
    • /forbidden → Should display DSpace Repository :: Forbidden
    • Any non-existing URL (e.g., /this-does-not-exist) → Should display DSpace Repository :: Page not found
  3. Previously, all these pages showed just DSpace as the browser title

Checklist

  • My PR is created against the main branch
  • My PR is small in size
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies
  • My PR uses i18n keys instead of hardcoded English text
  • My PR includes details on how to test it
  • If my PR fixes an issue ticket, I've linked them together

@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels Jan 29, 2026
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Jan 29, 2026
@JorgeEscire
Copy link
Author

Hi @tdonohue, all tests are now passing locally (5586 SUCCESS, 0 failures). Could you please re-run the CI checks?

image

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 port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

Cannot change title on error pages

3 participants