Skip to content

Comments

Fix issues with metadata api view redirect#9180

Draft
tylerjmchugh wants to merge 1 commit intogeonetwork:mainfrom
tylerjmchugh:fix-issues-with-metadata-api-view-redirect
Draft

Fix issues with metadata api view redirect#9180
tylerjmchugh wants to merge 1 commit intogeonetwork:mainfrom
tylerjmchugh:fix-issues-with-metadata-api-view-redirect

Conversation

@tylerjmchugh
Copy link
Contributor

There are a couple of issues with the metadata API view redirect introduced in #8966.

1. Language not preserved

The redirect URL does not include the language, so the link always resolves to the default language.

This means multilingual emails would have multiple links pointing to the same page with the default language. It would be better to have each link point to its respective langauge.

This PR adds support for a language parameter and uses it in the redirect URL. If the language code is invalid, it falls back to the default language.

2. Formatter name in permalink

The formatter name is currently embedded in the permalink. This creates a fragile link — if the formatter is renamed or removed, existing links will break.

This PR replaces the formatter name in the URL with a boolean redirect flag. The API then resolves the current record link formatter from configuration. This ensures links remain valid even if the formatter changes.

This PR contains API changes

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@tylerjmchugh tylerjmchugh marked this pull request as ready for review February 19, 2026 17:36
@ianwallen ianwallen added the bug label Feb 19, 2026
@ianwallen ianwallen added this to the 4.4.10 milestone Feb 19, 2026
@tylerjmchugh tylerjmchugh marked this pull request as draft February 19, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants