2.10 Query Widget Bug

1155
17
10-18-2018 10:12 AM
PhilLarkin1
Occasional Contributor III

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.

Tags (2)
0 Kudos
17 Replies
RobertScheitlin__GISP
MVP Emeritus

Phil,

  The icon property in your apps query widget config need to be updated.

0 Kudos
PhilLarkin1
Occasional Contributor III

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. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
PhilLarkin1
Occasional Contributor III

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. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

What is the path to the icon in your query widget config file?

0 Kudos
PhilLarkin1
Occasional Contributor III

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,
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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"
        }
      },
0 Kudos
PhilLarkin1
Occasional Contributor III

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. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos