bcgov / smk-legacy-ui

Legacy Admin UI for the SMK has been de-supported. Please see the CLI under https://github.com/bcgov/smk for an alternative.
Apache License 2.0
8 stars 3 forks source link

enabling "Display as Cluster" of uploaded geojson causes Save of site to fail #224

Open NicoledeGreef opened 6 years ago

NicoledeGreef commented 6 years ago

How to reproduce

-Access: http://smk.pathfinder.gov.bc.ca/smk-ui/ -Create a site -Upload geojson file (ZIP attached below) -Turn on "Display as Cluster" for the uploaded layer -Click Done Edits -Click Save

What behaviour I'm expecting and which behaviour I'm seeing

Expecting the site to Save and the version to increase.

Seeing an error: Error saving application alrc-draft-4. Error: HTTP Status 400 - type Status report

message description The request sent by the client was syntactically incorrect. Apache Tomcat/8.5.3

Minimal example reproducing the issue

The site called "ALRC draft 1" previously worked (July 18) but then my Save attempts started not working (July 30) .

"ALRC draft 4" is a new site with the same uploaded data that was used to track down the issue.

NicoledeGreef commented 6 years ago

The geojson is in the attached ZIP file.

assisted-living-and-residential-care-facilities.zip

dhlevi commented 6 years ago

@NicoledeGreef I just gave the json file a test in our local as well as the deployed version in dev, and it worked fine in both places. Just to check... you're not uploading the zip file, just the geojson file within, correct? zip files are reserved for shapefile only, and attempting to load a zip that contains geojson (or anything else) will fail.

dhlevi commented 6 years ago

Nope, scratch that, there is a problem occuring from the jackson parsing in java from the main mapconfiguration class that looks like it can cause problems with geojson files. I'm fixing it now and will check in a patch asap

NicoledeGreef commented 6 years ago

Fix verified. Thanks!