core-geonetwork icon indicating copy to clipboard operation
core-geonetwork copied to clipboard

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

Open josegar74 opened this issue 5 months ago • 2 comments

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 https://github.com/geonetwork/core-geonetwork/commit/1242d9cb359787fbb189e38524aea992503bea8b. It's unclear why it's different than in main branch

  • Pull request to main: https://github.com/geonetwork/core-geonetwork/pull/7431
  • Backport pull request to 4.2.x: https://github.com/geonetwork/core-geonetwork/pull/7740

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 avatar Aug 29 '24 11:08 josegar74