Error when opening a page

0
Hi All, I have a page with a datagrid and a dataview that 'listens' to the datagrid. In this dataview is the GoogleMaps widget to show the location on a map. When i start the app, every first time i get an error saying 'An error occurred, please contact your system administrator' when i click on an entry in the navigation. Pity it gives no reason what went wrong, just error.   Then i do it again ... and no complaints anymore.   In the widget one can set default latitude and longitude, it does not matter it won't help.   I checked all the entries in the database, whether there have valid latitudes and longitudes and they do. Further i tried to debug and see if there are any uninstantiated objects but i can't find any.   Anyone any ideas to overcome this?   In the navigation a microflow is called which determines the device and type of user and then via 'Show Page' call the required page. Any type of user and any device gets the error.   Thanks in advance, Hans  
asked
4 answers
0

Hi Hans,

I ran into a similar issue and I found out that basically the listening data view get initiated with an empty context object when the page is loaded.

Even if you set 'select first' on your data grid still on page load mendix will start up your listening data view and pass in an empty object. 

In my situation I solved this issue by checking if the context object is empty from inside the custom widget. This was a widget that I was working on, so I could change the code and avoid the error. I am not sure how you can work around this, considering you have a widget from the app store.

One idea would be to wrap the widget on the page in a conditional visibility div - not sure if this will help though.

-Andrej

 

answered
0

Select first is set on the grid.

 

I was thinking that the google app is already trying to show a location, but the object is still empty.

 

I will check the console asap.

Thanks

answered
0

In the console i get:

This is a challenge for me

answered
0

Initially i'd installed to Google Maps Module(v6.0 because the project is in Mx 6.10.3), from te app store.

After some searching i found out that in this packages an older version of the widget is present.

After downloading the Google Maps Widget, my issue has disappeared.

 

Thanks everybody for thinking with me.

answered