Skip to content

Cannot update the detail card for certain maps #3096

@offtherailz

Description

@offtherailz

Description

A map that had a thumbnail (removed) can not update detail card.
You have to apply some changes also to metadata to allow Save functionality to work.

In case of Bug (otherwise remove this paragraph)

Browser Affected
any

Steps to reproduce

  • Create a new map, with a thumbnail and detail card
  • Edit the map you created removing the thumbnail, then save again
  • Edit again the map and try to edit detail
  • Try to Save

Expected Result

  • The map is saved again with changes to the detail card

Current Result

  • Click on save button has no effect. You have to edit also title or description to make it work.

Other useful information (optional):

dev notes
The real save effect is generated by this

https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/maps/modals/MetadataModal.jsx#L190

And than this
https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/maps/forms/Thumbnail.jsx#L159

When this.props.map.newThumbnail has "NODATA" instead of undefined, the if block is skipped and so the map is not saved.

That code is more complicated then needed and it may require some refactor. We should also evaluate that #2908 may solve this and other issues, finalizing the refactor of this part that can be cancelled in favor of the dashboard's one, that is more stable and tested.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions