Information Look Up Web App config does not save

3366
22
Jump to solution
07-07-2016 07:09 AM
DuaneTreadon
Occasional Contributor

Hi all,

I have created a utility look up map using the Information Look Up web app.  The web map works great and does everything I need it to do.  However, when I go to make changes using Configure App the changes do not save.  When I click "Save" or "Save And View" it gets stuck in a loop and the saving gif just keeps doing its thing.  Only way to get out of it is to click "Close".  Any changes made in the configure App page do not get saved.  I created a new web app using the same Information Look Up web app template and has the same issues.  I also tried it on IE11 and FireFox.

I ran debugger (FireFox) and found this error :
(is this caused by the app programing and is a bug or is it something I'm doing?)

On Console Page

TypeError: p is null

Configure<.onSave()                                                                      Configure.js:112

Configure<.onView()                                                                     Configure.js:158

.cache["dojo/_base/lang"]/</e.hitch/<()                                           3.17:63

l/</c()                                                                                                3.17:119

.cache["dijit/form/_ButtonMixin"]/</q<._onClick()                         3.17:386

.cache["dojo/_base/lang"]/</e.hitch/<()                                            3.17:63

.cache["dijit/form/_ButtonMixin"]/</q<.__onClick()                       3.17:386

.cache["dojo/_base/lang"]/</e.hitch/<()                                            3.17:63

Configure.js:                                                                                     112:1

And...

Debugger Tab (when click"Configure.js:112")

},  
onSave: function() {
   
// Update app config values by calling addItem with overwrite set to true.
    
// show the loading icon
    
if (domClass.contains("loader", "hide")) {
      
domClass.remove("loader", "hide");

      }    
var saveConfig = this._appConfiguration;
    
// remove any non serilazable feature layers from json
    
if (saveConfig && saveConfig.values) {
      
for (var x in saveConfig.values) {
        
if (saveConfig.values.hasOwnProperty(x)) {

            var p = saveConfig.values;          
if (p.hasOwnProperty("sources")) {
            
var sources = p.sources;
            
array.forEach(sources, function(s) {

                if(s.hasOwnProperty("featureLayer")) {

                  delete (s.featureLayer);

                }            
});

0 Kudos
22 Replies
KellyHutchins
Esri Frequent Contributor

Duane Treadon​  In your particular app it looks like there are several options in the search dropdown list (World Geocoder, Solid Waste Pickup, Electric Service Area, Water Service area) etc. Are you using all of those search options? If not in  the configuration panel for that app can you try going to the Search section then uncheck any layers you aren't using in the search then see if it will let you save.

If that doesn't allow save to succeed can you try unchecking 'Enable Search Tool' then hit save to see if it will let you save?

0 Kudos
DuaneTreadon
Occasional Contributor

Hi Kelly,

When I go to configure app now I just get the loading gif and it does not let me get to a point where I can make any changes.

KellyHutchins
Esri Frequent Contributor

One option to try is to use the ago-assistant to edit the application data associated with that appid. Note that if you can reproduce this with a test app you may want to try these steps there first to avoid breaking your production app.

You can log-in to the ago-assistant app using the link below and use it to update urls, copy content, edit json associated with an item and more. But as I mentioned earlier it is possible to break your data doing this so try working off a backup first.

https://ago-assistant.esri.com/

After logging in choose 'View an item's JSON' from the I want to dropdown list. Then find the name of the app item you want to edit and click it and you'll see that the json for your app is displayed. This is displayed in two parts the item description and the data. The part you'll want to edit for the app is the 'Data' so scroll down to find that section. Here's an example of what it looks like on my end.

Screen Shot 2016-07-07 at 1.57.06 PM.png

Use the pencil icon to edit the data and replace the searchConfig portion of the json with the following:

"searchConfig": {
  "sources": [],
  "activeSourceIndex": 0,
  "enableSearchingAll": false
  },

After making the above edit - and before hitting save - it would be a good idea to copy all the content from the Data section and check that its still valid json using a tool like jsonlint.com.

JSONLint - The JSON Validator.

0 Kudos
DuaneTreadon
Occasional Contributor

I have tried this solution but it did not correct the problem. 

The problem only shows itself when you click the "Save" button or "Save & View" button.  I ran debugger in FireFox again and it stops with "TypeError p is null" (same as pasted in previous post in this thread)  when you click either of the save buttons.

If you click "Close" button it closes App Configuration and goes back to the app's information page.  This happens even when the program is stuck in the save loop.

Unsure if related but I also noticed these messages when running Console in Debugger.

Empty string passed to getElementById().  dojo.js:40:142

Use of getAttributeNode() is deprecated.  Use getAttribute() instead.     dojo.js:218:418

I have created a new Information look up web app using different data as a test and so far it is working.  I am going to recreate our Utility look up Web App from scratch again and see if I'll have the same success as with the test I did.

0 Kudos
JeremyPlanteen2
New Contributor II

Call Esri support and reference bug ID: BUG-000097451

There's a slightly different work-around for this than what's given above....with that bug ID they should have documentation.

DuaneTreadon
Occasional Contributor

Added info:

So far it is only the Information Look Up map app that I am having the issue with.  I created a different map using Basic Viewer (Retired) and was able to close, reopen and make changes in configuration. 

JT

0 Kudos
BrianLomas
Occasional Contributor III

I am having the exact same problem. Any ETA on when this might get fixed?

0 Kudos
DuaneTreadon
Occasional Contributor

Hi Brian,

I hope a solution is found.  I really like this template.  I posted below but in a summary I have found that the issue most often first shows itself are you have used the "close" butting in Configure App window.  Maybe that finding will help support isolate that part of the code.

The map app itself does not appear to be effected in anyway, just that I cannot update or make changes to settings.

0 Kudos
DuaneTreadon
Occasional Contributor

Kelly Hutchins

So I thought the issue had been fixed.  After creating a simple map as a test this morning all was working great with changing the configuration and saving without issues.  I then went to recreate my original utility look up map app form scratch.  All worked good and I was able to use configure app and then save or save & view without any issues.  I left the app for a bit and when I came back it allowed me to go into configure app and make a few changes and save,  working as expected.  However within a short time when I click save or save & view I started to get the loading gif icon that goes on for ever.  It only stops when I click close button.  So I was back to the same issue as I was having on my original map app.

In debugger I am getting the same error code in the same location "TypeError p is null  and it references Configure.  :112:1 like it was earlier today and previously. 

So it seemed to be fixed, but after using the configure app function it goes back to its old behaviors of locking on save.

Anymore info from Tech Support on a viable solution for getting it to work properly?  It is an awesome template and I have other ideas on how to use it for other projects, but if is keeps locking up on save it really cannot be used. 

0 Kudos
DuaneTreadon
Occasional Contributor

After some more testing I have found that this error seems to start when you use to "close" button in "Configure App"  but not all the time. I have created several maps and applied the template, made some edits in Configure App used Save and Save & View buttons no problems.  I used the browser back arrow buttons to get back to main app information page and entered configure app again and all was still working.  However when I used the "close" button in Configure App and then went back into configure app I would get the lock up on save and save & view.  Close button still closes configure window and takes you back to the app information page. 

So it appears that the error is being triggered by the use of the "close" button in Configure App, at least some of the time (most of the time).  Once the map falls into this condition nothing seems to reset the condition.  I tried logging out, clearing browser history, using a different browser and not matter what it still locks on save once the issue is present.

Hope this might help in problem solving the issue.

0 Kudos