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

(Upstream ?) Bug When Upload a Metadata File for A LayThere are some updates happening in different project. We need to make ser #251

Open
ismailsunni opened this issue Jun 7, 2017 · 10 comments
Labels

Comments

@ismailsunni
Copy link

ismailsunni commented Jun 7, 2017

While investigating on #143 I found this weird behaviour, here the steps that I took:

  1. Upload a layer (with the metadata file)
  2. Go to layer page, Edit Layer, and Upload Metadata
  3. You will be redirect to upload metada page, select your new metadata and click upload

I expect, the new metadata will replace the old one. But, it create new layer instead, with xml file only.

It's possible that this bug is upstream bug, but I don't have any geonode with geoserver instance to test.

Have you ever experience this thing @NyakudyaA @gubuntu @lucernae

child of #457

@ismailsunni ismailsunni added the bug label Jun 7, 2017
@ismailsunni
Copy link
Author

In stagging, I even got an error:
screen shot 2017-06-07 at 12 34 21

@gubuntu
Copy link

gubuntu commented Jun 8, 2017

The ability to upload standalone metadata arrived in 2.6 (I guess mainly to reference remote data sources).

But I would expect if you upload a new metadata document as an update to existing metadata that it would replace the existing record and remain associated with the same layer. If it's not doing that I think it's an upstream bug.

@ismailsunni
Copy link
Author

I got different error when I tried to upload a metadata in the geoserver backend one.
screen shot 2017-06-08 at 14 35 54

And it doesn't create new layer instance also.

@NyakudyaA
Copy link
Collaborator

@ismailsunni yes I have experienced this behavior. but with GeoServer, it actually uploads the xml and correctly associates it with the layer. The metadata uploaded this way cannot be edited

@gubuntu
Copy link

gubuntu commented Sep 19, 2017

@NyakudyaA please test again and comment or close

@NyakudyaA
Copy link
Collaborator

Yes this error still exists. We need to fix this.

@gubuntu
Copy link

gubuntu commented Sep 22, 2017

we need to make sure this works with QGIS server backend to support #143, asap

@lucernae
Copy link
Collaborator

@gubuntu I read through the code. It doesn't seem upstream code properly handles this or it maybe too deep
What I tried is this:

  1. Upload the same metadata from what is previously used to upload layer:

Doesn't work, the metadata document needs an identifier to properly specify which layer it belongs to in GeoNode

  1. Download the metadata from Layers Details, then upload it

Doesn't work, the xml can't be parsed. Probably because of some string in the Links reference.

  1. Download the metadata from Layers Details. Delete Links reference (because it will be created or the same anyway). Upload it.

I look at file_upload code, there is no reference that the new metadata info (it was successfully read), being used to update the information for the layer. I think GeoServer uses a different mechanism to update it. We might need to patch this on upstream.

@gubuntu
Copy link

gubuntu commented Sep 28, 2017

This sounds like another component of GeoNode that needs to be abstracted and decoupled from Geoserver so it is back-end agnostic.

@lucernae what do you think is the simplest thing we can do to get metadata upload and replace working, even if it is an upstream patch?

  • there should not be anything Geoserver or QGIS-specific linking a metadata document (or record) to a layer
  • there should be valid OWS service references in the appropriate metadata fields, auto populated and maintained by GeoNode
  • there should be an identifier associating a metadata document (or record) to a GeoNode layer if indeed it describes a GeoNode layer. If it describes a remote resource then not (unless the remote resource gets registered by GeoNode as a virtual layer?)

@gubuntu gubuntu added this to the Mozambique milestone May 8, 2018
@lucernae lucernae changed the title (Upstream ?) Bug When Upload a Metadata File for A Layer (Upstream ?) Bug When Upload a Metadata File for A LayThere are some updates happening in different project. We need to make ser Jul 18, 2018
@gubuntu gubuntu added backlog and removed ready labels Aug 20, 2018
@gubuntu gubuntu added ready and removed backlog labels Sep 13, 2018
@gubuntu gubuntu removed this from the Mozambique milestone Sep 16, 2018
@gubuntu gubuntu added backlog and removed ready labels Sep 16, 2018
@gubuntu
Copy link

gubuntu commented Oct 10, 2018

@lucernae hose does kartoza/geosafe#378 affect this?

@gubuntu gubuntu removed the backlog label Jul 9, 2019
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

4 participants