Edit widget breaks for subsequent edits

366
5
Jump to solution
12-04-2023 02:44 PM
Labels (1)
ChristopherCounsell
MVP Regular Contributor

Hi,

We have a web map with editing enabled and a form designed. Relatively simple, just calculations for username and Now(). 

The web map has been added to an ArcGIS Experience with an edit widget. It allows users to select points and update them. The same layer, form and map as above.

The issue is that the first edit works fine but any further edits on the same or other features, the 'update' button remains inactive. Users need to reload the page or sign in and out.

Editing works fine for:

  • Web Map Viewer and Field Maps
  • The first feature
  • The Experience previewed as draft??
  • Other experiences/maps

Editing does not work in the published experience builder for subsequent feature edits:

  • the admin/owner
  • For a re-created Experience

In the browser developer console we see error messages of GWM_003 token required on load. Undefined typeerrors for attributes.

Given that the edits work OK outside of experience and for the first edit, it's hard to identify this as a configuration issue. Have a technical support case open.

Anyone have any insight or suggestions?

0 Kudos
2 Solutions

Accepted Solutions
AlixVezina
Esri Regular Contributor

@ChristopherCounsell I have read the case and it describes that the web map was created with ONE View layer added several times to the map with MAP filters applied. I have a feeling that this could be related to the issue.

Also not sure how you created your Forms with the calculations (for each copy of the layer separately, or before duplicating the layer?). Not sure if there could be issues with forms as well when the same layer is added to the map.

Maybe try to see if creating separate Layer views for each Filter and adding these layers separately to the map, and setting up the Form for each one individually, might resolve the issue? Also make sure to double-check your share and editing settings in the view layer's item Settings.

I see some weird behavior when editing a layer added multiple times to the same web map, but it does not appear I was able to recreate the case you described with the information at hand. It looks like the support team has assigned more resources to troubleshoot this, so let's see if they can.

View solution in original post

ChristopherCounsell
MVP Regular Contributor

We were able to consistently reproduce the issue by adding the same view layer several times to a map and applying filters on the same field. Editing in experience builder to change values on the field with the filter broke the widget. It looks like the selection state gets out of sync with the features/map/widget and then can't compile the attributes correctly. 

The edit widget 'update' button stayed muted and the browser developer console widget throws an error Uncaught TypeError: Cannot set properties of undefined (setting 'attributes')

Esri support wasn't unable to reproduce it. Knowing the cause/fix for the issue, we chose not to pursue it, but I think it would have been good to look for a dev to look at it more deeply as it seems like the behaviour could manifest issues in other ways. Not a big issue as the workflow is likely a niche one.

For users I would recommend:

  • Don't ever add the same layer more than once to a map. Between this issue and the inability to take the map offline, it's just not a good practice on ArcGIS web maps.
  • Don't use map filters, particularly for editable layers. Use View layer filters to control your data as it's more secure. For web apps, set a filter at the app level for users to adjust with greater transparency.

 

View solution in original post

5 Replies
AlixVezina
Esri Regular Contributor

Hi @ChristopherCounsell do you have the Case or Bug number provided by the technical support team?

ChristopherCounsell
MVP Regular Contributor

Hi @AlixVezina thanks for your reply. It's case 03499745. No bug number as we don't have steps to reproduce.

Only addition to above information is it's a view layer added to a map three times and filtered by a drop-down status field at the map level. 

0 Kudos
ChristopherCounsell
MVP Regular Contributor

@AlixVezina have updated the case but to bring it back to this discussion

it appears that the experience builder can't properly handle dropping the feature selection if the the edit update pushes the feature out of the layer via a map filter. i.e. change status=active to inactive, when map layer filter set to status=active, breaks the experience. 

case has screenshots showing imbalance of selection between the map highlights, map 'selected features' graphics and editing widget selection.

The feature is actively filtered out of a layer but still shows in the edit widget.

subsequent edit attempts then throw attribute/property errors on a feature that doesn't exist in the layer but persisted in the edit wiget.

With Web AppBuilder retiring we need more reliable editing in a standard web mapping application. Have had a really subpar experience with the edit widget and survey123 widget in Experience Builder.

0 Kudos
AlixVezina
Esri Regular Contributor

@ChristopherCounsell I have read the case and it describes that the web map was created with ONE View layer added several times to the map with MAP filters applied. I have a feeling that this could be related to the issue.

Also not sure how you created your Forms with the calculations (for each copy of the layer separately, or before duplicating the layer?). Not sure if there could be issues with forms as well when the same layer is added to the map.

Maybe try to see if creating separate Layer views for each Filter and adding these layers separately to the map, and setting up the Form for each one individually, might resolve the issue? Also make sure to double-check your share and editing settings in the view layer's item Settings.

I see some weird behavior when editing a layer added multiple times to the same web map, but it does not appear I was able to recreate the case you described with the information at hand. It looks like the support team has assigned more resources to troubleshoot this, so let's see if they can.

ChristopherCounsell
MVP Regular Contributor

We were able to consistently reproduce the issue by adding the same view layer several times to a map and applying filters on the same field. Editing in experience builder to change values on the field with the filter broke the widget. It looks like the selection state gets out of sync with the features/map/widget and then can't compile the attributes correctly. 

The edit widget 'update' button stayed muted and the browser developer console widget throws an error Uncaught TypeError: Cannot set properties of undefined (setting 'attributes')

Esri support wasn't unable to reproduce it. Knowing the cause/fix for the issue, we chose not to pursue it, but I think it would have been good to look for a dev to look at it more deeply as it seems like the behaviour could manifest issues in other ways. Not a big issue as the workflow is likely a niche one.

For users I would recommend:

  • Don't ever add the same layer more than once to a map. Between this issue and the inability to take the map offline, it's just not a good practice on ArcGIS web maps.
  • Don't use map filters, particularly for editable layers. Use View layer filters to control your data as it's more secure. For web apps, set a filter at the app level for users to adjust with greater transparency.