Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor / Associated resource / Remote document / Add content type #8340

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fxprunayre
Copy link
Member

While adding a remote document URL, the app tries to extract title from the remote document (which can be XML or HTML page).

eg. https://metawal.wallonie.be/geonetwork/srv/api/records/19381245-dc52-438c-b1cd-cdf5d646b69e?language=all
image

or https://doi.org/10.1016/j.onehlt.2024.100873

The 2nd link has redirect and return an error if content type does not contains text/html and the link considered invalid can't be attached to the current metadata. This PR add supported content types.

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

Funded by Ifremer

While adding a remote document URL, the app tries to extract title from the remote document (which can be XML or HTML page).

eg. https://metawal.wallonie.be/geonetwork/srv/api/records/19381245-dc52-438c-b1cd-cdf5d646b69e?language=all
or https://doi.org/10.1016/j.onehlt.2024.100873

The 2nd link has redirect and return an error if content type does not contains text/html and the link considered invalid can't be attached to the current metadata.
@fxprunayre fxprunayre added this to the 4.4.6 milestone Sep 3, 2024
Copy link

sonarcloud bot commented Sep 3, 2024

Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

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

I tested the change and the link https://doi.org/10.1016/j.onehlt.2024.100873 shows a title Redirecting for the related metadata. Is that expected?

link-to-remote-record-metadata-title

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.

2 participants