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.
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.
<SPAN class="string token">"orderByFields"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"icon"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">""</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"showSQL"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
So change it to this and then you should be able to get past that error.
<SPAN class="string token">"icon"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"color"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">128</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">128</SPAN> <SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"size"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="number token">7.5</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"angle"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"xoffset"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"yoffset"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"type"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"esriSMS"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"style"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"esriSMSCircle"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"outline"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"color"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">128</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">255</SPAN> <SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"width"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="number token">0.75</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"type"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"esriSLS"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"style"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"esriSLSSolid"</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I ended up tearing down this widget and starting over again.
So it is working now?
yes
Glad to hear it.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.