-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Error assigning areas without geofields to movements #236
Comments
Ah probably the code that automatically copies the area geometry into the map needs to fail more gracefully. |
So I believe to reproduce, we need to create an area on the server, which is just a name, essentially, with no geometry assigned, then try to add that area to a movement log, is that correct, @alexadamsmith? The problem seems to be located here: https://github.com/farmOS/farmOS-client/blob/975e16b2769d97e9a901db03bbbdd6c323b0d5bd/src/client/components/EditLog.vue#L664 Presumably just adding a null-check at that line would resolve the issue. |
Came across this issue myself in testing (#256 ), forgot we had an issue open for it already. :-) Relevant from that issue:
|
I can look into this one over Thanksgiving too, since I was looking into it earlier as well |
This should take care of it |
Resolved by #271. |
I've stumbled across an error in the new movement/ mapping functionality. This occurs when I add a movement to a log, or modify an existing movement. Specifically, the error popps up when add an area that lacks a geofield using the 'movement to' selector. Areas that have geofields (whether polygons, multipolygons, etc) are not affected. The error does not cause the app to crash, but the area without a geofield is not added to the movement.
`[Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'geom' of undefined"
found in
---> at src/client/components/Autocomplete.vue
at src/client/components/EditLog.vue
at src/client/components/Logs.vue
at src/client/App.vue
warn @ vue.esm.js?a026:628
logError @ vue.esm.js?a026:1893
globalHandleError @ vue.esm.js?a026:1888
handleError @ vue.esm.js?a026:1848
invokeWithErrorHandling @ vue.esm.js?a026:1871
invoker @ vue.esm.js?a026:2188
invokeWithErrorHandling @ vue.esm.js?a026:1863
Vue.$emit @ vue.esm.js?a026:3891
selectSearchResult @ Autocomplete.vue?b669:82
click @ Autocomplete.vue?8338:85
invokeWithErrorHandling @ vue.esm.js?a026:1863
invoker @ vue.esm.js?a026:2188
original._wrapper @ vue.esm.js?a026:7559
vue.esm.js?a026:1897 TypeError: Cannot read property 'geom' of undefined
at VueComponent.addMovementArea (EditLog.vue?ca5d:664)
at results (EditLog.vue?f0e4:1053)
at invokeWithErrorHandling (vue.esm.js?a026:1863)
at VueComponent.invoker (vue.esm.js?a026:2188)
at invokeWithErrorHandling (vue.esm.js?a026:1863)
at VueComponent.Vue.$emit (vue.esm.js?a026:3891)
at VueComponent.selectSearchResult (Autocomplete.vue?b669:82)
at click (Autocomplete.vue?8338:85)
at invokeWithErrorHandling (vue.esm.js?a026:1863)
at HTMLLIElement.invoker (vue.esm.js?a026:2188)`
The text was updated successfully, but these errors were encountered: