New entries in Shortlist Builder sometimes partially duplicated; bad reference

748
4
09-19-2017 12:19 PM
PeterWiringa
New Contributor III

One of our users ran across a strange case with a multi-tab Shortlist story map hosted on AGOL. They have 124 entries on their first tab. When trying to add another entry at this point, if often appears as if two entries are added, then adding another opens the first entry in their list. I'll try to explain. This occurs in both the latest Chrome and Firefox and doesn't always happen. Eventually, there are some JS errors in the console.

Steps:

  1. Clicking "Add" to add a new entry (should be #125). Before the edit fields appear, there is just enough time to see that there are suddenly two unplaced entries . If this happens, it's downhill.
  2. The entry can be added as normal. Once complete, there are no unplaced entries indicated.
  3. Clicking add again, which should add #126, briefly shows two unplaced entries, again, then opens the editor for entry #1. No errors or new messages appear in the JS console at this point.
  4. Clicking the "X" to close the entry returns to the list of entries and produces multiple TypeErrors in the console.

    builder-min.js?v=2.3.2:1 Uncaught TypeError: Cannot read property 'some' of undefined
    at t (builder-min.js?v=2.3.2:1)
    at n.updateFocus (builder-min.js?v=2.3.2:1)
    at n.handleBodyFocus (builder-min.js?v=2.3.2:1)
    t @ builder-min.js?v=2.3.2:1
    updateFocus @ builder-min.js?v=2.3.2:1
    handleBodyFocus @ builder-min.js?v=2.3.2:1
  5. Back at the list of entries, the last item is shown as #127; there is no 126 visible. This is no image or other information associated with #127. Clicking on #127 opens entry #1, again. Clicking on #125 does appear to open that entry. There are two unplaced entries indicated. (see attached sl05.png)
  6. Switching to a different tab and then back to all projects shows #125 twice in the list, and also #127 twice. Clicking on either instance of 125 opens what appears to be #125. Clicking on the first instance opens something numbered 128. Closing that editor now shows two instances of #125 in the list but nothing numbered higher.
  7. From this point on, repeated errors in the console are seen.

I've tried deleting the last entry, #124, saving, and adding again, but the problem continues to occur. I created a separate Shortlist map and am into the low 130s for features and haven't seen this behavior yet, so it may be specific to this map.

The story map is viewable at http://umn.maps.arcgis.com/apps/Shortlist/index.html?appid=5a490b24224548d0a57abc075e33bf9b

Has anyone seen anything like this?

0 Kudos
4 Replies
MarkCooney
Occasional Contributor III

Hi Peter,

Can you share your app?  I am currently getting prompted for credentials to view the app.

Mark

0 Kudos
PeterWiringa
New Contributor III

Oops, sorry about that. Done.

FWIW, after seven minutes of waiting for it to finish checking (using the share tool in edit mode), I backed out and shared through the AGOL item view pages.

0 Kudos
MarkCooney
Occasional Contributor III

Hi Peter,

I have taken a look and am unable to reproduce consistently, I have seen it once or twice, but not consistently enough to be able to diagnose.  I'll add an issue for this to our repo and keep a look out for it.

And as for the slow loading of the share tool, that is because of the large number of features.  The share tool also scans all of the features in your Shortlist for potential issues, so the more features, the longer it will take (in addition to network speeds).

Mark

0 Kudos
PeterWiringa
New Contributor III

Hi Mark,

Thanks for taking a look, and so quickly. I kind of figured it was too obscure and not-consistently-reproducible to dive into. We might just have them try recreating from scratch, or spin one up a similar test one that gets to the same number of total entries and see if we start running into problems again, on the assumption that the total entries may tie into this. Maybe we'll discover something telling.

Thanks, again.

-pete