Esri/crowdsource-manager

BUG-000149766 Citizen Problem Manager web app becomes unusable when attempting to add the feature layer from another deployed Citizen Problem Reporter solution

Closed this issue · 6 comments

Citizen Problem Manager web app becomes unusable when attempting to add the feature layer from another deployed Citizen Problem Reporter solution.

Steps to Repro:

  1. Deploy the Citizen Problem Reporter solution in ArcGIS Online.

  2. Open the Citizen Problem Manager Web App in configure mode, notice how it functions properly without data.

  3. Have another user in the Organization also deploy the same solution.

  4. Open the Citizen Problem Manager web map in Map Viewer Classic. If it’s the newer version of the solution there will be a requests layer in the web map. If it’s an older version of the solution it will be the CitizenProblems feature layer.

  5. In the Citizen Problem Manager web map add the requests layer or CitizenProblems layer (depending on which version is deployed) from the different solution and save the web map. Should be two layers of the same name within the Web Map.

  6. Now open the Citizen Problem Manager Web App in configure mode. Notice how the application continually shows a loading sign and never completely loads. Does that in view mode as well.

7.For both solutions versions: removing the original solution layer permanently breaks the Web App. In this scenario the workaround works for the older version.

After a discussion on the workaround, it was requested from the Solutions team that a defect be logged for review.

Repro Data: (n/a)
Work Around:
This issue is due to a difference in the behavior between the older solution and the newer version.

For the older version that uses the CitizenProblems layer, the issue is not resolved when removing the other solution layer. Instead, go to the web map's item details page and then the Settings page. Disable and then re-enable search, and click save.
For the newer version, remove the other solution requests layer and save the web map if the original layer is not removed. There is no workaround if the original layer is removed from the web map.

Product: ArcGIS Enterprise
Functional Category: Portal Core
Client Platform: (n/a)
Version Found: 10.1
Planned Version Fixed: (n/a)
Comment: (n/a)

@sumitzarkar, could you please take a look at this one, I am seeing this in qa, so it is still an issue , do we allow same layer twice in the map?

@aparveen

We have analyzed this ticket and here are our findings:

  • We see two layers are added in the webmap
  • Both layers are created from the same item but the layers added multiple times in the same map
  • We see differences in the popupInfo of both the layers. The first layer has complete popupInfo whereas the second layer has empty popupInfo object
    image
  • The app is considering if popupInfo is defined fieldInfo should be available in it. However in this case the popupInfo is not having any filedInfo and the app is trying to get the length of fieldInfos and breaking
    image
  • And, hence we see the error
    image
  • So the issue is due to the wrong popupInfo configuration for the second layer
  • We can avoid breaking in the application by adding a check if fieldInfos are present in the popup info or not. And in such cases, the layer will be considered not having popup info and will be skipped adding in the webMap list of the application
    image
  • However, we should check how we configured the popupInfo for the second layer which is causing this issue.

Please let us know your thoughts and if required call me we can discuss in details

@sumitzarkar thanks for looking into it, may be we can fix this in 10.3

@sumitzarkar please go ahead and drop the code for this one

Verified in qa