After an update from 2.7 to 2.10 the Query Widget in the developer UI throws a few bugs. 2.7 Icons are missing. When I click on each query the error below is thrown: Cannot read property 'name' of null.
Phil,
The icon property in your apps query widget config need to be updated.
Hi Robert
Thanks for the suggestion.
The issue is that the image exists in the Query/css/images path but isn't loaded to the to DOM. Furthermore, changing the icon from the default set isn't possible. When I click 'Ok' the Uncaught TypeError is thrown again.
Phil,
The icon may exist in that folder but the app is trying to get it from a url as shown in the last red error message.
Right, I agree. My point is that I've confirmed that the icon exists where it should in the dev environment. For whatever reason it is not pushed to it's place in the DOM.
What is the path to the icon in your query widget config file?
The icon property is an empty string. It was an empty string at 2.7, and is an empty string in other apps at different versions (2.5,2.9) working in a production environment.
"orderByFields": [],
"icon": "",
"showSQL": true,
Phil,
So change it to this and then you should be able to get past that error.
"icon": {
"color": [
0,
0,
128,
128
],
"size": 7.5,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSCircle",
"outline": {
"color": [
0,
0,
128,
255
],
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSSolid"
}
},
It's a good idea but im not able to get any change in the config file to propagate to the widget. So, maybe something else is going on.
Are you editing the config.json in the widgets folder? If so that's the issue the config__x.json for the widget will be in the apps configs\Query folder.