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

Delete ISO 19139 thumbnail in the metadata editor doesn't work in GeoNetwok 4.2.x #8321

Closed
josegar74 opened this issue Aug 29, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@josegar74
Copy link
Member

josegar74 commented Aug 29, 2024

Describe the bug

Trying to delete an ISO 19139 thumbnail in the metadata editor doesn't work in GeoNetwok 4.2.x, the resource is still displayed in the editor after trying to delete and in the XML, the gmd:graphicOverview element is not removed.

This file is different in 4.2.x:

https://github.com/geonetwork/core-geonetwork/blob/4.2.x/schemas/iso19139/src/main/plugin/iso19139/process/thumbnail-remove.xsl

Than in main:

https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19139/src/main/plugin/iso19139/process/thumbnail-remove.xsl

The 4.2.x file is from this backport 1242d9c. It's unclear why it's different than in main branch

To Reproduce
Steps to reproduce the behavior:

  1. Creaate an ISO19139 metadata
  2. Link to an online resource and select Add a thumbnail
  3. Upload an image file
  4. In the metadata editor, delete the resource --> the editor is refreshed, but the resource is still there.

Expected behavior
The thumbnail is removed properly.

Additional context

@ianwallen I though the original pull request to main was intended for online resources, to be able to delete them properly if they have the same url. Is there any reason for this backport to use the same stuff for the thumbnails?

@josegar74 josegar74 added this to the 4.2.11 milestone Aug 29, 2024
@josegar74 josegar74 added the bug label Aug 29, 2024
@ianwallen
Copy link
Contributor

@josegar74

The intent was to also apply the logic to overviews as well as it is still possible to link multiple overviews with the same url. And if this were to happen and someone want to remove one then it should remove the correct one.

i.e.
Thumbnail 1
Thumbnail 2
Thumbnail 1

If the user click on delete for the last one then the last one should be removed and not the first one.

It seems like something went wrong on this change and the changes were not applied correctly on the main branch.
And they were not tested correctly on the 4.2.x branch.

Apologize for this error - let me apply a working fix to the main branch and we can backport the same changes 4.2.x and also HNAP

@josegar74
Copy link
Member Author

Thanks @ianwallen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants