Download both the latest eSearch & WAB 2.7, copied the eSearch folder to C:\GIS API\WebAppBuilder2.7\WebAppBuilderForArcGIS\client\stemapp\widgets and went to create a new app and i added the eSearch Widget and i was able to set it up but when i went to test it I go "Create Widget Error"Widget/eSearch/Widget". I tried the WAB 2.7 in firefox and Chrome and i get the same error. I did not edit anything in the WAB 2.7 or the eSearch folders.
Anyone else having this issue?
In Chromes browser console i get.
main.js?wab_dv=2.7:199 jimu.js init...
ConfigManager.js?wab_dv=2.7:136 Load Config: 887.1259765625ms
(index):1 Failed to load https://mapcase.deq.idaho.gov/arcgis/rest/info?f=json: The 'Access-Control-Allow-Origin' header contains multiple values 'http://******:3344, *', but only one is allowed. Origin 'http://******:3344' is therefore not allowed access.
MapManager.js?wab_dv=2.7:214 Load Map: 3382.7138671875ms
WidgetManager.js?wab_dv=2.7:114 widget [themes/LaunchpadTheme/widgets/Header/Widget] created.
WidgetManager.js?wab_dv=2.7:114 widget [widgets/ZoomSlider/Widget] created.
WidgetManager.js?wab_dv=2.7:114 widget [widgets/Coordinate/Widget] created.
WidgetManager.js?wab_dv=2.7:114 widget [widgets/Scalebar/Widget] created.
WidgetManager.js?wab_dv=2.7:114 widget [widgets/MyLocation/Widget] created.
WidgetManager.js?wab_dv=2.7:114 widget [widgets/HomeButton/Widget] created.
WidgetManager.js?wab_dv=2.7:114 widget [widgets/OverviewMap/Widget] created.
Widget.js?wab_dv=2.7:46 LocateButton::navigator.geolocation requires a secure origin.
WidgetManager.js?wab_dv=2.7:114 widget [themes/LaunchpadTheme/widgets/AnchorBarController/Widget] created.
WidgetManager.js?wab_dv=2.7:114 widget [widgets/Search/Widget] created.
AbsolutePositionLayoutManager.js?wab_dv=2.7:106 Load widgetOnScreen: 1238.56005859375ms
PanelManager.js?wab_dv=2.7:83 panel [_33_panel] created.
WidgetManager.js?wab_dv=2.7:116 create [widgets/eSearch/Widget] error:TypeError: Cannot read property 'length' of null
at Function.n.fromHex.b.colorFromHex [as fromHex] (https://jsdev.arcgis.com/3.23/init.js:208:110)
at Object._addCustomStyle (http://******:3344/webappbuilder/apps/2/widgets/eSearch/Widget.js?wab_dv=2.7:3913:30)
at Object.postCreate (http://******:3344/webappbuilder/apps/2/widgets/eSearch/Widget.js?wab_dv=2.7:183:14)
at Object.create (https://jsdev.arcgis.com/3.23/init.js:355:366)
at Object.postscript (https://jsdev.arcgis.com/3.23/init.js:354:104)
at new <anonymous> (https://jsdev.arcgis.com/3.23/init.js:200:129)
at Object.createWidget (http://******:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js?wab_dv=2.7:320:16)
at Object.<anonymous> (http://******:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js?wab_dv=2.7:112:35)
at https://jsdev.arcgis.com/3.23/init.js:63:337
at h (https://jsdev.arcgis.com/3.23/init.js:107:277)
Widget.js?wab_dv=2.7:60 Uncaught TypeError: Cannot read property 'name' of undefined
at Object.<anonymous> (Widget.js?wab_dv=2.7:60)
at Object.<anonymous> (init.js:63)
at Object.c [as onwidget-created] (init.js:119)
at Function.h.emit (init.js:124)
at Function.h.emit (init.js:125)
at Object.emit (init.js:117)
at Object.<anonymous> (WidgetManager.js?wab_dv=2.7:131)
at init.js:63
(anonymous) @ Widget.js?wab_dv=2.7:60
(anonymous) @ init.js:63
c @ init.js:119
h.emit @ init.js:124
h.emit @ init.js:125
emit @ init.js:117
(anonymous) @ WidgetManager.js?wab_dv=2.7:131
(anonymous) @ init.js:63
setTimeout (async)
(anonymous) @ WidgetManager.js?wab_dv=2.7:129
(anonymous) @ init.js:63
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ WidgetManager.js?wab_dv=2.7:189
(anonymous) @ init.js:63
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ init.js:457
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ WidgetManager.js?wab_dv=2.7:1159
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ utils.js?wab_dv=2.7:172
init.js:114 TypeError: Cannot read property 'length' of null
at Function.n.fromHex.b.colorFromHex [as fromHex] (init.js:208)
at Object._addCustomStyle (Widget.js?wab_dv=2.7:3913)
at Object.postCreate (Widget.js?wab_dv=2.7:183)
at Object.create (init.js:355)
at Object.postscript (init.js:354)
at new <anonymous> (init.js:200)
at Object.createWidget (WidgetManager.js?wab_dv=2.7:320)
at Object.<anonymous> (WidgetManager.js?wab_dv=2.7:112)
at init.js:63
at h (init.js:107) "TypeError: Cannot read property 'length' of null
at Function.n.fromHex.b.colorFromHex [as fromHex] (https://jsdev.arcgis.com/3.23/init.js:208:110)
at Object._addCustomStyle (http://******:3344/webappbuilder/apps/2/widgets/eSearch/Widget.js?wab_dv=2.7:3913:30)
at Object.postCreate (http://******:3344/webappbuilder/apps/2/widgets/eSearch/Widget.js?wab_dv=2.7:183:14)
at Object.create (https://jsdev.arcgis.com/3.23/init.js:355:366)
at Object.postscript (https://jsdev.arcgis.com/3.23/init.js:354:104)
at new <anonymous> (https://jsdev.arcgis.com/3.23/init.js:200:129)
at Object.createWidget (http://******:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js?wab_dv=2.7:320:16)
at Object.<anonymous> (http://******:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js?wab_dv=2.7:112:35)
at https://jsdev.arcgis.com/3.23/init.js:63:337
at h (https://jsdev.arcgis.com/3.23/init.js:107:277)
----------------------------------------
rejected at a (https://jsdev.arcgis.com/3.23/init.js:108:174)
at h (https://jsdev.arcgis.com/3.23/init.js:107:450)
at q (https://jsdev.arcgis.com/3.23/init.js:107:203)
at d.l.reject (https://jsdev.arcgis.com/3.23/init.js:109:488)
at Object.<anonymous> (http://******:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js?wab_dv=2.7:125:21)
at https://jsdev.arcgis.com/3.23/init.js:63:337
at h (https://jsdev.arcgis.com/3.23/init.js:107:277)
at q (https://jsdev.arcgis.com/3.23/init.js:107:203)
at d.resolve (https://jsdev.arcgis.com/3.23/init.js:109:280)
at Object.<anonymous> (http://******:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js?wab_dv=2.7:189:13)
----------------------------------------
Error
at d.then.b.then (https://jsdev.arcgis.com/3.23/init.js:110:97)
at Object.<anonymous> (http://******:3344/webappbuilder/apps/2/jimu.js/BaseWidgetPanel.js?wab_dv=2.7:76:53)
at Object.forEach (https://jsdev.arcgis.com/3.23/init.js:70:486)
at Object.loadAllWidgetsInOrder (http://******:3344/webappbuilder/apps/2/jimu.js/BaseWidgetPanel.js?wab_dv=2.7:66:13)
at Object.startup (http://******:3344/webappbuilder/apps/2/jimu.js/BaseWidgetPanel.js?wab_dv=2.7:55:12)
at Object.g (https://jsdev.arcgis.com/3.23/init.js:197:400)
at Object.startup (http://******:3344/webappbuilder/apps/2/jimu.js/OnScreenWidgetPanel.js?wab_dv=2.7:65:14)
at Object.openPanel (http://******:3344/webappbuilder/apps/2/jimu.js/PanelManager.js?wab_dv=2.7:151:17)
at Object.<anonymous> (http://******:3344/webappbuilder/apps/2/jimu.js/PanelManager.js?wab_dv=2.7:93:16)
at https://jsdev.arcgis.com/3.23/init.js:63:337"
n @ init.js:114
(anonymous) @ init.js:114
filter @ init.js:71
h @ init.js:114
setTimeout (async)
h @ init.js:114
setTimeout (async)
q @ init.js:114
q @ init.js:107
l.reject @ init.js:109
a @ init.js:108
h @ init.js:107
q @ init.js:107
l.reject @ init.js:109
(anonymous) @ WidgetManager.js?wab_dv=2.7:125
(anonymous) @ init.js:63
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ WidgetManager.js?wab_dv=2.7:189
(anonymous) @ init.js:63
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ init.js:457
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ WidgetManager.js?wab_dv=2.7:1159
h @ init.js:107
q @ init.js:107
resolve @ init.js:109
(anonymous) @ utils.js?wab_dv=2.7:172
Solved! Go to Solution.
CC,
So it looks like this is a issue on my side. Try changing the _addCustomStyle function in the Widget.js (way at the bottom of the file) to:
_addCustomStyle: function(theme) {
var customStyles = lang.getObject('customStyles', false, theme);
if(!customStyles || !customStyles.mainBackgroundColor || customStyles.mainBackgroundColor === ""){
return;
}
...
Line 3 is the change.
CC Weedcontrol,
It appears you do not have the latest version of the eSearch widget then as that error was fixed in the 2.6.1.1 release.
I re downloaded WAB 2.7 and the eSearch form you Enhanced Search Widget Version 2.6.1.1 - 1/3/18 web page (Attachments, eSearch.zip363.0 Km) and placed it in the C:\GIS API\WebAppBuilder2.7\WebAppBuilderForArcGIS\client\stemapp\widgets. Started a new app added the eSearch widget and added a layer to query but i get the same results when i test the eSearch widget. When i click on the configure, click on "learn more about" it takes me to the Enhanced Search Widget Version 2.6.1.1 search help page. I try to hold the Alt + click on the widget but I get nothing.
Not sure what i am doing wrong...
Have you tried a different theme then the Launchpad theme?
Tried the Billboard, Dart, Jewelry Box Theme and got the same results.
Something is very off then. The error message you supplied is related to the launchpad theme and something that was fixed in 2.6.1.1.
I tried your Identify widget (Version 2.5.0.1 - 08/16/2017) and it works with with all the themes.
I just tried the eSearch with the Foldable theme and it works, i get the error with the other themes.
Seems to only work (well at least for me) only with the Foldable Theme.
When you hold the alt key and click in the body of the widget (not the titlebar or the tabs area) what version does the widget report?
with the foldable theme i get.
Widget Version: 2.6.1.1 Widget is designed to run in Web AppBuilder version: 2.6 This enhanced search widget offers the ability to search by a string, geometry and spatial relationship.
OK, You have me stumped now. I just created a brand new WAB 2.7 Dev app using the Launchpad theme and the WAB 2.6.1.1 eSearch widget (that i freshly downloaded from the download link) and it worked fine.