MSFREACH / msf-reach

Web platform for MSF-REACH
https://msf-reach.org/
4 stars 5 forks source link

fixes #537 #612

Closed matthewberryman closed 6 years ago

matthewberryman commented 6 years ago

Note I've set this up to merge to dev but needs https://github.com/MSFREACH/msf-reach/pull/590 resolved first as this branch was forked from issues/579

matthewberryman commented 6 years ago

@mehrdadgit I'm getting some errors as follows after setting up a new event of type tsunami Here's the event (using \copy (select * from cognicity.events where id=64) to ~/scratch/temp):

64  active  natural_disaster    2018-08-27 01:21:52.342+00  1679b701-b4f3-427a-a4ce-ce76d83c45dc    {"name": "tsunami", "user": "matthewberryman", "areas": [], "bounds": {"_northEast": {"lat": 13.085497691047646, "lng": 112.55561828613281}, "_southWest": {"lat": 6.856213311181545, "lng": 106.22749328613281}}, "country": "unknown", "severity": "", "sub_type": "tsunami", "description": "tsunami", "event_status": "Monitoring", "incharge_name": "Matthew", "event_datetime": "2018-08-27 11:21", "severity_scale": 2, "sharepoint_link": "", "security_details": "", "incharge_position": "", "severity_measures": [{"scale": 2, "description": ""}]}  0101000020E6100000000000400F595B4096DBE4F813F12340  2018-08-27 01:21:55.685237+00

Here's the error on edit and analyze:

vue.min.js:6 TypeError: Cannot read property 'length' of undefined
    at $e.eval (eval at Ii (vue.min.js:6), <anonymous>:3:3695)
    at $e.t._render (vue.min.js:6)
    at $e.r (vue.min.js:6)
    at zo.get (vue.min.js:6)
    at zo.run (vue.min.js:6)
    at St (vue.min.js:6)
    at Array.<anonymous> (vue.min.js:6)
    at t (vue.min.js:6)
k @ vue.min.js:6
t._render @ vue.min.js:6
r @ vue.min.js:6
zo.get @ vue.min.js:6
zo.run @ vue.min.js:6
St @ vue.min.js:6
(anonymous) @ vue.min.js:6
t @ vue.min.js:6
Promise.then (async)
e @ vue.min.js:6
(anonymous) @ vue.min.js:6
Nt @ vue.min.js:6
zo.update @ vue.min.js:6
Co.notify @ vue.min.js:6
set @ vue.min.js:6
editEvent @ events.js:1888
n @ vue.min.js:6
click @ VM1224:3
e @ vue.min.js:6

Here's the error on edit (second time):

Map.js:1038 Uncaught Error: Map container is already initialized.
    at e._initContainer (Map.js:1038)
    at e.initialize (Map.js:129)
    at new e (Class.js:22)
    at Object.Ct [as map] (Map.js:1644)
    at $e.loadMap (events.js:1577)
    at $e.n [as loadMap] (vue.min.js:6)
    at $e.editEvent (events.js:1902)
    at $e.n [as editEvent] (vue.min.js:6)
    at click (eval at Ii (vue.min.js:6), <anonymous>:3:487)
    at HTMLButtonElement.e (vue.min.js:6)
mehrdadgit commented 6 years ago

OK I might know the reason; will put a fix. Confirming first error happens on event page when you click on Analyse? (not landing page) The second error is also part of 579, I know how to fix, I can fix when 579 is done.

matthewberryman commented 6 years ago

Confirmed

mehrdadgit commented 6 years ago

First one fixed.

mehrdadgit commented 6 years ago

ready to merge @matthewberryman (after #590)