Hi @RobertScheitlin__GISP , thanks for the response. It does sound like the issue with the url path. To demonstrate, this was my search symbology settings:
And this was the display after selecting these two points:
I don't think there are errors, this was the developers console:
@PropertiesCurtin version 2.4 is very old and many enhancements have been made since then (think about it that is 16 minor version behind). I pretty sure that you have the layer set to use symbology "from Server". If you change it to "from Defaults" then you will see the light cyan circle you have showing in your image.
Hi Robert! We'd like to use the eSearch widget on a secured service with stored credentials and limit usage enabled via the Item page on ArcGIS Online. Do you know URL(s) we would need to whitelist on the usage limitation to allow your widget to call that service?
I realized after I posted this that there is another way to do it. I need to copy the URL from the item page and use that as the URL in the eSearch widget. Apologies for the noise on an already long forum! 🙂
Our organization recently upgraded from ESRI Enterprise 10.8.1*** to 10.9. eSearch 2.13 worked fine. But we noticed it failed to open in an existing app (made in 10.7) that used webapp Builder. A panel slight opens up slightly. It stays on that only showing the loading bar. I copied and pasted the latest version (2.17) to replace the older version and still no luck.
We tested the widget in a new mapping application and it seemed to work (full disclosure: we tested one function).
But for when I inspected the page when I clicked on the icon, I got the following error:
fail to startup panel 44bc75c5dbb44498b89f1b072405d413_50_panel. TypeError: Cannot read property 'indexOf' of undefined
init.js:116 TypeError: Cannot read property 'on' of undefined at t (init.js:124) at Object.<anonymous> (Widget.js?wab_dv=2.19:54) at init.js:65 at t (init.js:109) at a.then.e.then (init.js:112) at Object._showIconContent (Widget.js?wab_dv=2.19:53) at Object._switchNodeToOpen (Widget.js?wab_dv=2.19:51) at Object.<anonymous> (Widget.js?wab_dv=2.19:47) at init.js:65
init.js:116 TypeError: Cannot read property 'style' of null at Object.r.set [as setStyle] (init.js:170) at Object._switchMaxBtn (Panel.js?wab_dv=2.19:9) at Object.resize (Panel.js?wab_dv=2.19:8) at Object.onNormalize (Panel.js?wab_dv=2.19:8) at Object.onOpen (Panel.js?wab_dv=2.19:7) at Object.<anonymous> (main.js?wab_dv=2.19:1788) at init.js:65 at t (init.js:109) at p (init.js:109) at a.resolve (init.js:111) "TypeError: Cannot read property 'style' of null\n at Object.r.set
Uncaught TypeError: Cannot read property 'style' of null at Object.r.set [as setStyle] (init.js:170) at Object._switchMaxBtn (Panel.js?wab_dv=2.19:9) at Object.resize (Panel.js?wab_dv=2.19:8) at Object.onMapResize (main.js?wab_dv=2.19:1792) at Object.<anonymous> (init.js:65) at Object.<anonymous> (init.js:678) at Object.e [as onResize] (init.js:121) at Object._resize (init.js:638) at Object._execResize (init.js:637) at init.js:65 r.set @ init.js:170 _switchMaxBtn @ Panel.js?wab_dv=2.19:9 resize @ Panel.js?wab_dv=2.19:8 onMapResize @ main.js?wab_dv=2.19:1792 (anonymous) @ init.js:65 (anonymous) @ init.js:678 e @ init.js:121 _resize @ init.js:638 _execResize @ init.js:637 (anonymous) @ init.js:65 setTimeout (async) resize @ init.js:636 (anonymous) @ init.js:65 onWindowResize @ main.js?wab_dv=2.19:1383 (anonymous) @ init.js:65
We also tried to introduce the widget on the same existing app. We were able to access the settings and everything but we were unable to click ok (no message on the dev console). It was greyed out
***My colleague did notify that when we upgraded from 10.7 to 10.8.1, the widget worked fine on existing apps. However, we still faced the greyed out ok button.
Can you identify the issue? We did notice this issue and corrected this on all our apps that used a custom widget. They all have worked including the popup panel widget.
"We also tried to introduce the widget on the same existing app. We were able to access the settings and everything but we were unable to click ok (no message on the dev console). It was greyed out" - Are there any error messages in the web console when you do this?
What theme are you using in that existing app that was made in 10.7? "A panel slight opens up slightly"???
We have been using the enhanced search widget (older version) on several web app for many years. Recently, one user ask how to minimize the enhanced search widget window.
Does the newer version include the icon to maximize and minimize the window?
@LiangJiang1 That really depends on the theme you are using and where you have the widget place (i.e. foldable theme in the header controller vs. the on screen place holders).
Here is our response. Like I said, I just copied and pasted the new version in the same wwwroot folder as before. Maybe I should have done otherwise? It does work on a new app with the same template. I can provide the app json if that helps.
"We also tried to introduce the widget on the same existing app. We were able to access the settings and everything but we were unable to click ok (no message on the dev console). It was greyed out" - Are there any error messages in the web console when you do this? There are no error messages in the console. There is no response to the clicking of the OK button.
What theme are you using in that existing app that was made in 10.7? "A panel slight opens up slightly"??? We are using the Jewelry box theme and the widget is in the Header controller section. it slightly opens up as so:
@RobertScheitlin__GISP Thank you for such quick reply. I haven't check the app's and widgets' configuration for a while. We use Jewelry Box Theme. It is likely in HeaderController.
@LiangJiang1 Even in WAB 2.5 the jewelry box theme allows for widgets in the header controller to be collapsed using the double up arrow and un-collapsed using the double down arrow in the widget panel header.
unfortunately our enterprise is internal. Looks like we solved the problem. As we updated, we also cleaned some of our services. Since the widget linked to one of the deleted feature services, somehow it wasn't letting us save and we weren't getting an error message about that. Hope that makes sense. But thank you for your attention and speedy replies. Looking forward to future versions and new tools...
@RobertScheitlin__GISP Thanks for the clue. I remember it wrong, we placed the Enhanced Widget in the lower left corner in the Jewelry Box theme. It is not in the Header controller.
I test to place the widget into the Header Controller, the collapse/un-collapse button shows.
Thank you to design the enhanced search widget! I try to add the search result as a new layer and can select from the lay list. Does the enhanced search widget have this function? Thanks!
I inserted the Enhanced Search widget. I try to search based on Address or XY coordinators and add as a new layer in the web map. I used the world street basemap as the search layer, but I got an error 'Included fields empty'. What is your suggestion? What is the URL I should link to? Thanks!
@JinchengGao You can not search the world street basemap. That is a tiled Map service, you need to use a Mapserver or a Featureserver service. When you install the eSearch widget it has several example service already added.
Thank you for your reply! Do you know which layer the standard search widget uses for the search function? When you type an address, a point will be added in the map for the search result. I want to use the same function with your Enhanced search widget to add a new layer to the map with the search result. Thank you for your help!
I found to a solution you provided to add a marker to the search result from Search widget. Do you think we can use the marker created by the Search widget as reference to set query expression in the Query widget? But I am not sure if we can add an ID to the marker, then the query widget can call the widget ID and execute a query referenced on the marker such as 20 miles buffer around the marker. Any suggestions could you provide? Thanks!
I can use the Search widget to find a location, then add a pin at the search point to execute a query task with a buffer distance in the Query widget. But, I try to set the search point as the default pin point in the query widget to execute a query task with a buffer. I think I can use publishData (searchResult) in the Search widget, then use fetchData() and onReceiveData(data) in query widget to get the result. But I don't know how to parse the data and set as default. Could you provide any helps? Thanks!
@CourtneyMenikheimUsing Microsoft Edge: I do a search by value from which I get a list of results (selected features) . If I click on one of the selected features on the list, it doesn't zoom to that feature on the map. If I do the same, using Google Chrome, the zoom to the selected feature works just fine (same WebApp, same map service, search on same layer).
There must be an issue in the French localization of the dialog. So the quick fix is to make the widget show in English for you. To do this go to the strings.js file for the app you are working in (i.e. server/apps/[App#]/widgets/eSearch/nls/strings.js) and open it in a text editor and set the
"fr":1,
to
"fr":0,
Save that file and restart WAB.
Ultimately it will help to find the localization string that is causing the issue by opening you browsers web console and seeing the error(s) displayed there.
What version of the widget code did you download? I have fixed those French locale issue in the strings.js a couple of releases ago. The error you are showing is that the single quote in the settings.js strings has to be escaped. For example in your version it has:
allowfcexport:"Exportateur de collection d'objets",
and in more recent version it is:
allowfcexport:"Exportateur de collection d\'objets",
Notice the \ (backslash) before the '(single quote).
In WAB you can Hold the Alt key on your keyboard and then click on the Widget (not the settings dialog, but the actual widget) and a new popup will appear that tells the widgets version number.
';
}
}
}
catch(e){
}
}
}
if (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase()) {
if (trLabelsHtml != "") {
var labelSname = "";
if(labelEle[i].querySelector("ul li:nth-child(1)").getAttribute("aria-hidden")){
labelSname = labelEle[i].querySelector("ul li:nth-child(1)").outerHTML;
}
labelEle[i].innerHTML = "";
labelEle[i].innerHTML = labelSname + trLabelsHtml;
}
}
}
}
}
catch(e){
}
}
}
/* V 2.0:3 = Store not translated reply id */
if(lingoRSXML.snapshotLength == 0){
if($scope.falseReplyID == "") {
$scope.falseReplyID = value;
}
}
/* Get translated Body of Replies/Comments */
var lingoRBXML = doc.evaluate(lingoRBExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for(var i=0;i 0) {
var attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('div.custom-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else if(rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('#attachments').length > 0){
if ("TkbArticlePage" == "BlogArticlePage") {
attachDiv = rootElement.querySelector('div.lia-quilt-row-main .lia-message-body-content').querySelector('#attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else{
attachDiv = "";
}
}else{
attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('#attachments').outerHTML;
}
}
else {
attachDiv = "";
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var k = 0; k < feedbackDivs.length; k++) {
feedbackDiv = feedbackDiv + feedbackDivs[k].outerHTML;
}
}
}
else {
var attachDiv = rootElement.querySelector('div.lia-message-body-content').querySelector('div.Attachments.preview-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
} else {
attachDiv = "";
}
/* Everyone tags links */
if (document.querySelectorAll("div.TagList").length > 0){
var everyoneTagslink = document.querySelector('div.lia-quilt-row-main').querySelector(".MessageTagsTaplet .TagList");
if ((everyoneTagslink != null)||(everyoneTagslink != undefined)){
everyoneTagslink = everyoneTagslink.outerHTML;
}
else{
everyoneTagslink = "";
}
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-message-body-content').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var m = 0; m < feedbackDivs.length; m++) {
feedbackDiv = feedbackDiv + feedbackDivs[m].outerHTML;
}
}
}
}
} catch (e) {
}
if (body_L == "") {
/* V 2.0:7 Replacing translated video data with source video data */
var newBodyVideoData = newBody.querySelectorAll('div[class*="video-embed"]');
angular.forEach($scope.videoData[value], function (sourceVideoElement, index) {
if (index <= (newBodyVideoData.length - 1)) {
newBodyVideoData[index].outerHTML = sourceVideoElement.outerHTML
}
});
/* V 2.0:7 = Replacing translated image data with source data */
var newBodyImageData = newBody.querySelectorAll('[class*="lia-image"]');
angular.forEach($scope.imageData[value], function (sourceImgElement, index) {
if (index <= (newBodyImageData.length - 1)) {
newBodyImageData[index].outerHTML = sourceImgElement.outerHTML;
}
});
/* V 2.0:7 = Replacing translated pre tag data with source data */
var newBodyPreTagData = newBody.querySelectorAll('pre');
angular.forEach($scope.preTagData[value], function (sourcePreTagElement, index) {
if (index <= (newBodyPreTagData.length - 1)) {
newBodyPreTagData[index].outerHTML = sourcePreTagElement.outerHTML;
}
});
}
var copyBodySubject = false;
if (body_L == "") {
copyBodySubject = true;
body_L = newBody.innerHTML;
}
/* This code is written as part of video fix by iTalent */
/* try{
var iframeHTMLText = body_L;
var searchIframeText = "<IFRAME";
var foundiFrameTag;
if (iframeHTMLText.indexOf(searchIframeText) > -1) {
foundiFrameTag = decodeHTMLEntities(iframeHTMLText);
foundiFrameTag = foundiFrameTag.split('src="')[1];
body_L = foundiFrameTag;
}
}
catch(e){
} */
/* This code is placed to remove the extra meta tag adding in the UI*/
try{
body_L = body_L.replace('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />','');
}
catch(e){
}
/** We should not replace the source content if user profile language and selected target language matches with source language **/
if(showTrContent) {
var compiled = false;
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = null
if("TkbArticlePage"=="IdeaPage"){
// var customAttachDiv = '';
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
compiled = true;
/* Attach atttach div */
// document.querySelector("div.translation-attachments-"+value).innerHTML = attachDiv;
rootElement.querySelectorAll('div.lia-message-body-content')[0].insertAdjacentHTML('afterend',attachDiv);
if(rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message').length > 1){
rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message')[1].remove();
}
} else {
if("TkbArticlePage"=="TkbArticlePage"){
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
}else{
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv + attachDiv;
compiled = true;
}
}
/* Destroy and recreate OOyala player videos to restore the videos in target languages which is written by iTalent as part of iTrack LILICON-79 */ /* Destroy and recreate OOyala player videos */
try{
// $scope.videoData[value][0].querySelector("div").getAttribute("id");
for(var vidIndex=0; vidIndex<$scope.videoData[value].length; vidIndex++){
if( $scope.videoData[value][vidIndex].querySelector("div") != null){
var containerId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].containerId;
videoId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].videoId;
/** Get the Video object */
vid = OO.Player.create(containerId,videoId);
/** Destroy the video **/
vid.destroy();
/** recreate in the same position */
var vid = OO.Player.create(containerId,videoId);
}
}
}
catch(e){
}
try{
for(var vidIndex=0; vidIndex<($scope.videoData[value].length); vidIndex++){
if($scope.videoData[value][vidIndex].querySelector('video-js') != null){
var data_id = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-video-id');
var data_account = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-account');
var data_palyer = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-player');
var div = document.createElement('div');
div.id = "brightcove";
div.class = "brightcove-player";
div.innerHTML =
'(view in my videos)'
var data = div.getElementsByClassName("video-js");
var script = document.createElement('script');
script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js";
for(var i=0;i< data.length;i++){
videodata.push(data[i]);
}
}
}
for(var i=0;i< videodata.length;i++){
document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML;
document.body.appendChild(script);
}
}
catch(e){
}
if(!compiled){
/* Re compile html */
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
}
}
if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) {
/* Adding Translation flag */
var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) {
return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase()
});
if (tr_obj.length > 0) {
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.".replace(/lilicon-trans-text/g, tr_obj[0].title);
try {
if ($scope.wootMessages[$rootScope.profLang] != undefined) {
tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title);
}
} catch (e) {
}
} else {
//tr_text = "This message was translated for your convenience!";
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.";
}
try {
if (!document.getElementById("tr-msz-" + value)) {
var tr_para = document.createElement("P");
tr_para.setAttribute("id", "tr-msz-" + value);
tr_para.setAttribute("class", "tr-msz");
tr_para.style.textAlign = 'justify';
var tr_fTag = document.createElement("IMG");
tr_fTag.setAttribute("class", "tFlag");
tr_fTag.setAttribute("src", "/html/assets/langTrFlag.PNG");
tr_fTag.style.marginRight = "5px";
tr_fTag.style.height = "14px";
tr_para.appendChild(tr_fTag);
var tr_textNode = document.createTextNode(tr_text);
tr_para.appendChild(tr_textNode);
/* Woot message only for multi source */
if(rootElement.querySelector(".lia-quilt-forum-message")){
rootElement.querySelector(".lia-quilt-forum-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) {
rootElement.querySelector(".lia-message-view-blog-topic-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){
rootElement.querySelector(".lia-quilt-blog-reply-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-message")){
rootElement.querySelector(".lia-quilt-tkb-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){
rootElement.querySelector(".lia-quilt-tkb-reply-message").insertBefore(tr_para,rootElement.querySelector(".lia-quilt-row.lia-quilt-row-footer"));
} else if(rootElement.querySelector(".lia-quilt-idea-message")){
rootElement.querySelector(".lia-quilt-idea-message").appendChild(tr_para);
} else if(rootElement.querySelector('.lia-quilt-occasion-message')){
rootElement.querySelector('.lia-quilt-occasion-message').appendChild(tr_para);
}
else {
if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) {
rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para);
} else {
rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para);
}
}
}
} catch (e) {
}
}
} else {
/* Do not display button for same language */
// syncList.remove(value);
var index = $scope.syncList.indexOf(value);
if (index > -1) {
$scope.syncList.splice(index, 1);
}
}
}
}
});
});
/* V 1.1:2 = Reply Sync button for multi source translation */
} catch(e){
console.log(e);
}
};
if((rContent != undefined) && (rContent != "")) {
drawCanvas(decodeURIComponent(rContent));
/** Update variable with selected language code **/
$scope.previousSelCode = code_l;
}
};
/**
* @function manageTranslation
* @description Managess the translation of given language for the thread
* @param {string} langCode - Language Code
* @param {string} tid - Thread ID
*/
$scope.manageTranslation = function (langCode, tid) {
//debugger;
$scope.showTrText = false;
/* V 2.0:5 = actualStatus variable introduced to indicate detailed connector status on UI. This variable holds the actual translation percentage */
$scope.transPercent = "";
$scope.actualStatus = "";
if (tid != "") {
var bulkTranslation = lithiumPlugin.bulkTranslation(langCode, tid);
bulkTranslation.then(function (trContent) {
if(trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, langCode);
if(langCode != "en-US") {
$scope.showTrText = true;
}
}
if((trContent.status != "NA") && trContent.status != null) {
// $scope.transPercent = String(trContent.status);
$scope.actualStatus = String(trContent.status);
} else {
// $rootScope.errorMsg = "Translation is in progress. Please check again a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
$scope.workbench = trContent.wb;
/* V 2.0:4 = Trigger uncalled or delayed callbacks (documnet uploaded/translation completed from lithium).*/
if(trContent.callback == 'true') {
var trCompletCallback = lithiumPlugin.trCompletCallback(langCode, trContent.docID);
trCompletCallback.then(function (callback){
// $rootScope.errorMsg = "Downloading Translated content in " + langCode + " now. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if (trContent.callback == 'upload') {
var trCompletUpload = lithiumPlugin.trCompletUpload(langCode, trContent.docID);
trCompletUpload.then(function (callback) {
//$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if ("many" == "one") {
$scope.updateOOS();
} else if("SmartConx" == "SmartConx"){
if ("many" == "many"){
$scope.updateOOS();
}
}else if ((trContent.status != null) && trContent.status.includes("100")) {
/* If everything fine then only check Out of Sync status */
$scope.updateOOS();
} else {
/* If translation perccent is less than 100 then show the percentage on UI */
$scope.transPercent = $scope.actualStatus;
}
});
}
}
/**
* @function selectThisLang
* @description Called on select dropdown.
* @param {string} lang - Language code
*
*/
$scope.selectThisLang = function (lang, anonymousFlag) {
/* 1.4:3 Update Analytics on language selection */
try {
setTimeout(()=>{
lingoThreadLangSelected(lang, '910880');
console.log("Language",lang);
},5000)
} catch (e) {
console.log(e);
}
/** Display Translated content **/
var getTranslation = lithiumPlugin.getTranslation(lang, "910880");
getTranslation.then(function (trContent) {
if (trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, lang);
} else {
//$rootScope.errorMsg = "Translation is in progress. Please check again in a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
});
};
var decodeEntities = (function() {
// this prevents any overhead from creating the object each time
var element = document.createElement('div');
function decodeHTMLEntities (str) {
if(str && typeof str === 'string') {
// strip script/html tags
str = str.replace(/